in reply to Passing a variable to a regex
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; # ^
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Passing a variable to a regex
by mavericknik (Sexton) on Sep 17, 2015 at 11:05 UTC |