[英]Match last occurrence regex pattern
I want to find the last occurrence of the pattern from the below code.我想从下面的代码中找到模式的最后一次出现。
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
Pattern: import {**} from '**';模式: import {**} from '**';
Where ** is like a wildcard, can match any characters其中**就像一个通配符,可以匹配任何字符
From the above code, I want to find exactly the line mentioned below.从上面的代码中,我想准确地找到下面提到的那一行。
import {AppComponent} from './app.component';
I want to find the last occurrence of the pattern from the below code.我想从下面的代码中找到模式的最后一次出现。
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
Pattern: import {**} from '**';模式: import {**} from '**';
Where ** is like a wildcard, can match any characters其中**就像一个通配符,可以匹配任何字符
From the above code, I want to find exactly the line mentioned below.从上面的代码中,我想准确地找到下面提到的那一行。
import {AppComponent} from './app.component';
I want to find the last occurrence of the pattern from the below code.我想从下面的代码中找到模式的最后一次出现。
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
Pattern: import {**} from '**';模式: import {**} from '**';
Where ** is like a wildcard, can match any characters其中**就像一个通配符,可以匹配任何字符
From the above code, I want to find exactly the line mentioned below.从上面的代码中,我想准确地找到下面提到的那一行。
import {AppComponent} from './app.component';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.