I have thousands of these in many different rules rules
edit 1698
set src-address \"172.29.44.51/32\"
set dst-address \"172.29.44.67/32\"
set service \"tcp-1
Here is a notepad++ only solution. It is using macros, because you say you have many different rule files.
^(?!set service).+?\r\nset service
\1first set service\3
check Regular Expression in the lower left\r\nset service
^first set service
set service
check Regular Expression in the lower leftNow you can open all your rule files and apply the Macro to each file. If you need to delete the macro, you find it under Macro -> Modify Shortcut/Delete Macro.
Edit: here is a screenshot to debug the problems with the zero matches you write about in the comments: , please note the marked sections:
\r\n
in the Find expression The number of lines have to be modified:
The result of suggested search Regex: