regex to allow only numbers letters and hyphen code example Example: regex to allow only numbers letters and hyphen /^[0-9A-Za-z\s\-]+$/