Regex: Replace a number (or can be a word) in a particular line

Regex: Replace a number (or can be a word) in a particular line

I have this number 2002 on multiple lines, from multiples files.

`On March 02, 2002, in Performance Management, by Michael London`
`On December 14, 2002, in Performance Management, by Michael London`

I want to replace 2002 with 2012 , as to become:

`On March 02, 2012, in Performance Management, by Michael London`
`On December 14, 2012, in Performance Management, by Michael London`

答案1

FIND: (^.*)(2002)(.*?)(Michael)(.*?)

REPLACE BY: \12012\3\4\5

or

FIND: (^.*)(?=(2002)).*?(in Performance Management)

REPLACE BY:\12012, \3\4

相关内容