I tried this code for validating IP address, but it doesn\'t work...
public static bool IP(string ipStr) { string pattern = @\"^([1-9]|[1-9][0-9]|1[0-9][
I would use IPAddress.TryParse static method instead.
IPAddress ip; bool b = IPAddress.TryParse("1234.12.12.12",out ip);