Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Regular Expression to Match IP Address

by bart (Canon)
on Oct 03, 2004 at 20:32 UTC ( [id://396055]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ($\, $,) = ("\n", "\t");
    print $_, /\b(\d+)\b(?(?{$1 >= 256})(?!))/ ? 'Y' : 'N' for 0 .. 1000;
    
  2. or download this
        /\b(\d+)\b/
    
  3. or download this
        (?(condition)yes-pattern)
    
  4. or download this
    (?{ code })
    
  5. or download this
        (?!)
    
  6. or download this
    /^(\d+)(?(?{$1 >= 256})(?!))\.(\d+)(?(?{$2 >= 256})(?!))\.(\d+)(?(?{$3
    + >= 256})(?!))\.(\d+)(?(?{$4 >= 256})(?!))$/
    
  7. or download this
    /^(\d+)\.(\d+)\.(\d+)\.(\d+)$(?(?{$1 >= 256 || $2 > 256 || $3 >= 256 |
    +|$4 >= 256})(?!))/
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found