in reply to Re: Efficient regex matching with qr//; Can I do better?
in thread Efficient regex matching with qr//; Can I do better?
but then of course I only get one of the matches (even if both match).if ($text =~ /(?<p1>\b$pattern1\b)|(?<p2>\b$pattern2\b)/) { foreach my $foo (keys %+) {print $foo.','.$+{$foo}."\n";} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Efficient regex matching with qr//; Can I do better?
by moritz (Cardinal) on Jul 14, 2008 at 12:30 UTC | |
by kruppy (Initiate) on Jul 14, 2008 at 14:20 UTC | |
by moritz (Cardinal) on Jul 14, 2008 at 14:28 UTC | |
by kruppy (Initiate) on Jul 14, 2008 at 18:07 UTC | |
by moritz (Cardinal) on Jul 14, 2008 at 20:35 UTC | |
|