I have hundreds of files with different content like as
public delete(entity: Model1): Observable<any> {
public delete(entity: ModelABC): Observable<any> {
and I want to add one more parameter in the method like as below using VS code replace:
public delete(entity: Model1, simulate: boolean): Observable<any> {
public delete(entity: ModelABC, simulate: boolean): Observable<any> {
I have tried with below expression. but, It does not work correctly.

Any solution? How can I replace all the matching line with correct replacement?


([A-Za-z0-9]+)and captured value references start at$1. so find:public delete\(entity: ([A-Za-z0-9]+)\): Observable<any> \{replace:public delete(entity: $1, simulate: boolean): Observable<any> {