Regex for IP address

I would use IPAddress.TryParse static method instead.

IPAddress ip;
bool b = IPAddress.TryParse("1234.12.12.12",out ip);

Leave a Comment