diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-01-17 08:58:53 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-01-17 09:20:20 -0700 |
commit | cfaf538b6276c6a8ef80ff6c66e106c6a4f1caaa (patch) | |
tree | b452229efc219b8936089921181cd3bedb77718a /ext | |
parent | 0c6e81ebcf01f01349b1260a05c55b61266c80d4 (diff) | |
download | perl-cfaf538b6276c6a8ef80ff6c66e106c6a4f1caaa.tar.gz |
Add /a regex modifier
This restricts certain constructs, like \w, to matching in the ASCII range
only.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/re/re.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/re/re.pm b/ext/re/re.pm index 7a489950f4..3ce5beba07 100644 --- a/ext/re/re.pm +++ b/ext/re/re.pm @@ -28,6 +28,7 @@ my %reflags = ( d => 0, l => 1, u => 2, + a => 3, ); sub setcolor { @@ -144,7 +145,7 @@ sub bits { my $reflags = $^H{reflags} || 0; my $seen_charset; for(split//, $s) { - if (/[dul]/) { + if (/[adul]/) { if ($on) { if ($seen_charset && $seen_charset ne $_) { require Carp; @@ -291,7 +292,7 @@ default, simply put at the top of your code. -The character set /dul flags cancel each other out. So, in this example, +The character set /adul flags cancel each other out. So, in this example, use re "/u"; "ss" =~ /\xdf/; |