develooper Front page | perl.perl5.porters | Postings from May 2013

Re: [perl #117327] Sequence (?#...) not recognized in regex

Thread Previous | Thread Next
From:
Ronald J Kimball
Date:
May 1, 2013 02:56
Subject:
Re: [perl #117327] Sequence (?#...) not recognized in regex
Message ID:
20130501025607.GA8335@penkwe.pair.com
On Tue, Apr 30, 2013 at 04:09:36PM -0700, Ricardo SIGNES via RT wrote:

> On the other hand, it closes the case on this bug, and it is quite
> tempting to believe that if any code is relying on this very sketchy area
> of the regex system, it's already a grotesque mess, and such code
> probably doesn't even *exist* anyway.  Unfortunately, such code clearly
> does exist:
> http://grep.cpan.me/?q=%5C%28%5Cs%2B%5C%3F%5B%21%3A%3E%5D
> 
> As someone who loathes "just put more whitespace anywhere you like"
> grammars, I was sad to see my name in that list. ;-) It looks to me like
> "compressed regex nonsense" is likely to be a factor here, which means
> "stuff breaking that nobody knows why or how or what to fix."

FWIW, Net::Whois::Parser, Net::Domain::Info::Whois, and Email::Valid all
matched your search due to the following code:

$RFC822PAT = <<'EOF';
[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\
xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xf
...
ff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(
?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80
...
EOF

$RFC822PAT =~ s/\n//g;

The whitespace is removed from the pattern before use, so these modules
would not actually be affected by this change.


Several of the other modules you found would be affected, however.


Ronald

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About