Problem: Validate a string to check if it contains a valid IP Address. I mean 455.12.56.999 should be kicked out.
Here's the quick and simple way :
if(UriHostNameType.IPv4 == Uri.CheckHostName(sStringThatShouldContainIP) ||
UriHostNameType.IPv6 == Uri.CheckHostName(sStringThatShouldContainIP))
This will return if the specified string is IPv4 or v6 or just a DNS style name. Thanks to the guy who wrote this .NET class.. I'm 're-using' or mooching this one.
Here's my was-to-be-unleashed-uber Plan B:
Use this regex from Expresso with some boilerplate regex matching .NET Code.
(?
A point to human searches against online searches ?