diff options
author | Dominic Dunlop <domo@slipper.ip.lu> | 1997-08-07 00:00:00 +0000 |
---|---|---|
committer | Tim Bunce <Tim.Bunce@ig.co.uk> | 1997-08-07 00:00:00 +1200 |
commit | 84850974f570c6c594cc0df54611ffc5f0b26130 (patch) | |
tree | e04cad942ec48979bb0e560c12f84b921b901660 /hints/genix.sh | |
parent | 744c5d8ad78d7234bac4c9f20e9850c814faa8bc (diff) | |
download | perl-84850974f570c6c594cc0df54611ffc5f0b26130.tar.gz |
Document use of - in a regex char class.
Subject: [PATCH] Re: regex matcher incorrect
At 13:17 +0200 1997-06-24, Ulrich Windl wrote:
>In a statement like "$_[0] =~ /^([ugoa]+)([+-=])([rwxst]*)$/;" some
>incorrect patterns were matched. As an example "go/rw" was matched.
>Adding a backslash in front of the minus, making "[+\-=]", solved the
>problem.
>
>As this is a non-obvious feature, I'd consider that as a bug. Originally
>the problem was seen on Linux running the same version of Perl.
Thanks Ulrich. You're right. While all UNIX-descended regular expression
packages work pretty much the same way in respect how you make "-" a member
of a character class, neither the documentation delivered with Perl nor the
book "Programming Perl" tells you what to do, and they should. Here's a
patch to apply to the perlre.pod documentation file:
p5p-msgid: v03102804afd578bcef2c@[194.51.248.88]
Diffstat (limited to 'hints/genix.sh')
0 files changed, 0 insertions, 0 deletions