sashac88 has asked for the wisdom of the Perl Monks concerning the following question:
Hey,Good Monks.
I'm trying to write something simple that will accept
values from <STDIN> only if the value is in IP format,i.e.
only if it's four numbers 0-255 separated by dot.
Actually I only need a way to restrict to input of numbers 0-255 ,since [0-9] or \d won't help me -too wild. Please help .
I'm trying to write something simple that will accept
values from <STDIN> only if the value is in IP format,i.e.
only if it's four numbers 0-255 separated by dot.
Actually I only need a way to restrict to input of numbers 0-255 ,since [0-9] or \d won't help me -too wild. Please help .
Janitored by Arunbear - retitled from 'Regular Expression'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Regular Expression to Match IP Address
by mawe (Hermit) on Oct 03, 2004 at 13:52 UTC | |
Re: Regular Expression to Match IP Address
by Dietz (Curate) on Oct 03, 2004 at 13:06 UTC | |
by codecookers (Initiate) on Mar 16, 2010 at 12:26 UTC | |
Re: Regular Expression to Match IP Address
by CountZero (Bishop) on Oct 03, 2004 at 12:25 UTC | |
Re: Regular Expression to Match IP Address
by bart (Canon) on Oct 03, 2004 at 20:32 UTC | |
Re: Regular Expression to Match IP Address
by aquarium (Curate) on Oct 03, 2004 at 12:46 UTC | |
Re: Regular Expression to Match IP Address
by Anonymous Monk on Oct 03, 2004 at 20:36 UTC | |
by TedPride (Priest) on Oct 03, 2004 at 21:12 UTC | |
by bmann (Priest) on Oct 04, 2004 at 05:46 UTC | |
| |
Re: Regular Expression to Match IP Address
by TedPride (Priest) on Oct 03, 2004 at 21:02 UTC | |
by Joost (Canon) on Oct 03, 2004 at 21:23 UTC | |
by TedPride (Priest) on Oct 04, 2004 at 05:12 UTC |
Back to
Seekers of Perl Wisdom