Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Is this a bug in perl regex engine or in my brain?

by AnomalousMonk (Archbishop)
on Oct 06, 2015 at 20:48 UTC ( [id://1143978]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "my $regex = '(2[0-4]|1?[0-9])?[0-9]|25[0-5]';
    ...
    '33' matched
    333
    '333' matched
    
  2. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "my $regex = qr/(2[0-4]|1?[0-9])?[0-9]|25[0-5]/;
    ...
    '222' matched
    333
    '333' did not match
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1143978]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-18 09:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found