Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by AnomalousMonk (Bishop)
on Oct 06, 2015 at 20:48 UTC ( #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? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2021-12-04 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (30 votes). Check out past polls.

    Notices?