Created
December 12, 2011 10:06
-
-
Save plu/1466347 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my $TOKEN_RE = qr/ | |
(?: | |
<(?<tag> | |
\s* | |
[^>\s]+ | |
)> | |
)?? | |
/xis; | |
"<html><body></body></html>" =~ m/$TOKEN_RE/gcs; | |
for ( 1 .. 1000000000 ) { | |
my $tag = $+{tag}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hmmm... komische Sache das! Ist wohl ne Kombination aus named captures und den ? quantifiern. Wenn man die weg lässt, dann läufts auch mit den named captures.