Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Don't Use Regular Expressions To Parse IP Addresses!

by Anonymous Monk
on Oct 27, 2008 at 03:43 UTC ( #719699=note: print w/ replies, xml ) Need Help??


in reply to Don't Use Regular Expressions To Parse IP Addresses!

Something seems to be off on the example of dotted quad representation to binary. If you start with the example of 172.31.254.1 you should stick to it. This has the binary representation of 1010 1100 0001 1111 1111 1110 0000 0001 or 2887777793 in radix 10 (unlike 2887726590 as was stated earlier, which in fact corresponds to 172.31.53.254, which is also what the example continues to assume the ip was, for some reason).


Comment on Re: Don't Use Regular Expressions To Parse IP Addresses!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-12-29 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls