So,
I need a regex expression to match a string that does not include a couple of substrings. I want regex to match all lines containing /paths in them unless they contain string1 or string2 prior to /paths
Do not match:
foo = string1("/paths
string2 + "/paths
string1 = "/paths
"#{string2}/paths
But matches:
source("/paths
bg : "/paths
Thanks
I used the following sed command to do so
sed -i -e '/string1\|string2/!s/paths/fix_paths/gI' FILE_NAMEIt does not do exactly search for the strings prior my paths, but it matched what I intended to match and worked for my specific case.
Thanks all for your help