my $pattern = qr{ (?i) pa+rt }xms;
Leaving aside the merits or demerits of deploying 'x' and 'm' here, I'm just wondering why you have put one regex modifier inside the qr{ ... } and the other three outside. It would seem more consistent to do either
my $pattern = qr{ pa+rt }xims;
or
my $pattern = qr{(?xims) pa+rt };
Just a little puzzled :-s
Cheers,
JohnGG
In reply to Re^2: Capturing string matched by regex
by johngg
in thread Capturing string matched by regex
by tunafish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |