develooper Front page | perl.perl5.porters | Postings from March 2000

Regular expression not matching correctly (PR#788)

From:
shaun
Date:
March 8, 2000 03:24
Subject:
Regular expression not matching correctly (PR#788)
Message ID:
200003080120.RAA31514@activestate.com
Full_Name: Shaun Morris
Version: AS 522
OS: Windows NT 4.0
Submission from: (NULL) (208.248.21.128)


$_ = "x";
my(@params) = /^(x)?\s*x/;				 
print join(';', @params), "\n";

The code above prints 'x' under AS 522.  Under AS Perl 5.003_07 build 306, it
correctly prints nothing.  If you remove the \s*, it works properly.



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