I have the following regex ^[a-zA-Z0-9]+$ which would allow alpha numeric characters. The problem here is that if I enter only numeric character like \"897687\"
^[a-zA-Z0-9]+$
This function will return true or false based on whether the Regular Expression is matched or not,
public static Boolean isAlphaNumeric(string strToCheck) { Regex rg = new Regex(@"^[a-zA-Z0-9\s,]*$"); return rg.IsMatch(strToCheck); }