
regex greediness problem (possible bug?)
[posted & mailed]
On Nov 27, Igor Pechtchanski said:
Quote:
>Summary: I'm trying to match a regular expression containing
>non-printable characters (e.g. "\xFF" or "\x00"). The pattern
>contains a greediness modifier (".*?"), but doesn't work if a
>non-printable character follows the modifier. If I use a printable
>character after the "?", the pattern suddenly works... Has anyone
>else encountered this problem, and, if so, does anyone have a
>solution?
This bug was fixed in September (by me :) ). The problem is that there's
a line in the regex source that doesn't allow for a high-bit character
there. This was fix 12031, which has yet to make it out to a released
version of Perl.
--
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **