in reply to How to modify my regex?
withmy $regex = 'PATTERN'; s/$regex/.../;
ors/PATTERN/.../;
Otherwise you're soon going to run into the different quoting rules between literal strings and literal patterns; e.g. "\bfoo" and qr/\bfoo/ mean two different things.my $regex = qr/PATTERN/; s/$regex/.../;
|
|---|