my $new_value='$2 and $1'; my $string="(Jack) and (John)"; my $regex=qr/$string/; $string = "Jack and John"; eval "\$string=~s/\$regex/$new_value/"; print $@ if $@; print "$string\n";
In reply to Re: Re: Constructing a list of regexes
by tall_man
in thread Constructing a list of regexes
by fletcher_the_dog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |