in reply to creating qr from existing regex
Then put "(?$flags:" in front of it, and ")" behind it. You can use that string ($re) directly as a regex:
edit Oops, one too many colons:
You can also turn it into a regex object:$re = "(?$flags:$core)"; if($input =~ $re) { ... }
$qr = qr/$re/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: creating qr from existing regex
by AnomalousMonk (Archbishop) on Feb 09, 2018 at 21:07 UTC | |
by bart (Canon) on Feb 12, 2018 at 11:47 UTC |