I use this regular expression to match any string contains only English letters /^[a-zA-Z\s]+$/
Now I need to edit this to make to match dashes ‘-‘ and dots ‘.’ along with English letters.
the string may contains dash or dot or non(just letters).
Any Idea ?
Just add
-and.in the character class like this :