in reply to Re^3: Efficient regex matching with qr//; Can I do better?
in thread Efficient regex matching with qr//; Can I do better?
, or? But then I'm unable to match at the same position. I have probably misunderstood you somehow because this solution doesn't need named captures as far as I can tell.while ($text =~ /(\b$pattern1\b)|(\b$pattern2\b)/g) { # Do something with $+ }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Efficient regex matching with qr//; Can I do better?
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 | |
by kruppy (Initiate) on Jul 15, 2008 at 05:13 UTC |