develooper Front page | perl.perl5.porters | Postings from October 2015

Re: [perl #116639] regex optimiser wrongly rejects certain matchesinvolving embedded comments

Thread Previous | Thread Next
From:
Karl Williamson
Date:
October 19, 2015 14:56
Subject:
Re: [perl #116639] regex optimiser wrongly rejects certain matchesinvolving embedded comments
Message ID:
5624FF4F.5040308@khwilliamson.com
On 10/19/2015 08:26 AM, Abigail wrote:
>      $ perl -wE '"aaaaaaaaaa" =~ /a { 1,10}/x; say $& // "UNDEF"'
>      UNDEF
>      $
>
> (In this case, it tries to match the literal string "a{1,10}" -- one
> can wonder whether that's the most useful thing it could do).

Note that this now give a warning, even without the '-w' command line 
option:

	$ blead -E '"aaaaaaaaaa" =~ /a { 1,10}/x; say $& // "UNDEF"'
	Unescaped left brace in regex is deprecated, passed through in 	regex; 
marked by <-- HERE in m/a { <-- HERE  1,10}/ at -e line 1.
	UNDEF
	$

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