简体   繁体   中英

Find and replace using regex in Notepad++

I am trying to figure out how to change these three lines in Notepad++ from this

foo('a');
foo('b');
foo('c');

to this

foo('a',new=>'4');
foo('b',new=>'4');
foo('c',new=>'4');

//(foo)(

  1. Go to the Menu Bar, then Search, then Replace.
  2. Ensure that "Search Mode" is set to regex.
  3. Enter the following into "Find what": \\\\)
  4. Enter the following into "Replace with": \\\\, new=>\\'4\\'\\)
  5. Press the "Replace All" button

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM