Let's say I have a string:
cat_dog_ !mouse= <name="Jake_Russell!"> gog+cat
I want to match specific symbols _!=+
, but not in <name="Jake_Russell!">
that part of this regex <name=\".+\">
. So result should be __!=+
I've tried lookAhead:
(?!<name=\".+\">)([_!=+])
but as a result, it matches symbols in <name="Jack_Russell!">
too.