regex names with spaces and special characters code example
Example 1: regex replace all special characters
Regex.Replace(your String, @"[^0-9a-zA-Z]+", "")
Example 2: regex for letters and spaces
/* Note this works with the onkeyup function in html with js */
function lettersandSpacesOnly(input){
var regexs = /[^a-z ]*$/gmi;
input.value = input.value.replace(regexs, "");
}