Hi, @wagner-leung, @alan-kilborn and All,
My bad ! So, if I interpret your intended result, strictly, the regex S/R becomes :
SEARCH (?s)object((?!object).)+?type=2((?!object).)+?\K\babc(?=\h*=)
REPLACE **aaa**
Hope this version is the good one ! Of course, you may change the line type=2 and/or the variable abc as you like !
Cheers,
guy038
P.S. :
An other formulation of the search regex, using the free-spacing mode (?x) , would be :
SEARCH (?xs) object ((?!object).)+? type=2 ((?!object).)+? \K\b abc (?=\h*=)
For instance, the following search regex would search for the variable abc, in any object block containing, either, the line type=2 or type=3
SEARCH (?xs) object ((?!object).)+? type=[23] ((?!object).)+? \K\b abc (?=\h*=)