Answers for "only letters and spaces regex"

2

only letters and spaces regex

/^[a-zA-Z\s]*$/g
Posted by: Guest on April-12-2021
1

regex only letters not spaces

var re = /^[A-Za-z]+$/;
Posted by: Guest on November-09-2020
-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, "");
  }
Posted by: Guest on October-18-2020

Code answers related to "only letters and spaces regex"

Browse Popular Code Answers by Language