Notepad++ regular expression replace

2020-04-19 08:17发布

问题:

I need to replace get_option('any_letter_number') with $options_css['any_letter_number'] In Notepad++, I can match what I need with get_option\('.*?'\) but replacing it with $options_css\['.*?'\] doesn't work.

Any help will be appreciated.

Thanks!

回答1:

In a regex replacement, you use $1 to refer to a captured subpattern.

get_option\('(.*?'\)
// replace with:
$options_css['$1']