Update: I also had to add a space to the regex:
s/( [NOR|OR].*.IN1\()(\Q$val\E)( \).*IN2\()([^)]*)(.*)/$1$4$3$2$5/g; # ^
In reply to Re: Passing a variable to a regex
by choroba
in thread Passing a variable to a regex
by mavericknik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |