Regex.IsMatch("Your string", @"^[0-9]+$");
Regex.IsMatch(input, @"^[a-zA-Z]+$");
Regex.IsMatch(input, @"^[a-zA-Z0-9]+$");
public bool checkContainsIntegar(string myString) { Regex myCheck = new Regex("^[0-9]*$"); if (myCheck.IsMatch(myString)) return true; else return false; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)