Subject: | Chokes on character class ending with a dash |
Character classes in perl regexps ending with a dash are documented to
take the dash literally. Not so in Regexp::Parser:
% perl -le 'use Regexp::Parser;
my $r = qr/[ _-]/;
warn "parsed regexp: $r";
my $iter = Regexp::Parser->new( $r )->walker;
'
parsed regexp: (?-xism:[ _-]) at -e line 3.
Unmatched [; marked by <-- HERE in m/(?-xism:[ _-]) <-- HERE / at -e line 4