Answers for "regex to allow space in javascript"

0

javascript regex only letters and spaces

//regex expression:
var reg_name_lastname = /^[a-zA-Z\s]*$/;

//Validation to the user_name input field
if(!reg_name_lastname.test($('#user_name').val())){ //
    alert("Correct your First Name: only letters and spaces.");
    valid = false;
}
Posted by: Guest on December-21-2020
1

regex space javascript

var str = "Is this all there is?";
var patt1 = /\s/g;
Posted by: Guest on July-17-2020

Code answers related to "regex to allow space in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language