Subject: | wrong parsing character classes and crash |
Date: | Sun, 19 Aug 2012 11:38:38 +0200 |
To: | bug-Regexp-Debugger [...] rt.cpan.org |
From: | Thomas Eckardt <Thomas.Eckardt [...] thockar.com> |
in every Perl build - so version independed - Regexp::Debugger causes the
regex engine to fail if escaped []
are followed by any character range in a character class
#!/usr/local/bin/perl
use strict;
'aa' =~ /[\[\]a-z]+/o;
exit;
perl -MRegexp::Debugger test_re.pl
failes with
Invalid [] range ")-(" in regex; marked by <-- HERE in
m/(?#R_d:0)(?>\A(?{Regexp::Debugger::_reset_debugger_state()})(?!
))|(?:(?{Regexp::Debugger::_report_event(0, 0, pos()); $^R
})(?=)(?:(?{Regexp::Debugger::_report_event(0, 1, pos()); $^R
})(?=)[\[\](?{Regexp::Debugger::_report_event(0, 2, pos()); $^R
})(?=)(?{Regexp::Debugger::_report_event(0, 3, pos());
$^R })(?=)a(?{Regexp::Debugger::_report_event(0, 4, pos()); $^R })(?=)-(
<-- HERE ?{Regexp::Debugger::_report_event(0, 6
, pos()); $^R })(?=)z(?{Regexp: at test_re.pl line 4.
Thomas Eckardt
DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally
privileged and protected in law and are intended solely for the use of the
individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no
known virus in this email!
*******************************************************