Hi All!
I am trying to do a regex substitiution that is contained in a variable. For example, if I have:
$substitution = 's/this/that/';I would like to do something like:
$candidate =~ ($substitution);or
$candidate =~ s/($substitution)/;or something like that. Both of those are obviously wrong, but you get the idea. I've been fooling around with every little syntax modification I can think of and nothing seems to work. Might there be a better way to go about this? (I cannot change the fact that I am given the actual substitution regex, complete with delimiters, in a scalar variable...)
In reply to Substitution with regexes in variables by nafion112
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |