I am trying to match a set of strings outside paired strings with a regex expression.
There is at least one post regarding this however it is not clear to me how this works. Regex match text outside of brackets
For example, a sample string would be:
<= \( <= \) <= \( <= \) <= \( <= \)
My current regex used a lookbehind and lookahead although this does not work:
(?<=(\\\)))<=(?=(\\\())
I want to match <= which are not between \( \)
so I can replace it with &le to get:
&le \( <= \) &le \( <= \) &le \( <= \)
Note that \( \)
may or may not exist.