[Gllug] Re: Bash Data validation libraries
Richard Jones
rich at annexia.org
Wed Feb 15 10:54:05 UTC 2006
On Tue, Feb 14, 2006 at 04:04:27PM +0000, Richard wrote:
> Richard Jones wrote:
>
> >A lot of these things can be done fairly simply using the available
> >tools. For instance, a naive check of IP addresses might be:
> >
> >
> <snip>
>
> >^[1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?\.[1-9]\[0-9]?[0-9]?$ ]]; then
> >
> >
> <snip>
> At the risk of sounding rude, what about the less naive version?
Well of course the less naive version would check that the IP address
components are in the range 0-255, that it's not a multicast or
reserved address, would work with IPv6 addresses, and so on. Lengthy
regexp ...
Rich.
--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list