Regular Expression To Match Only Alphabets And Spaces

Regular expressions are one of the most powerful tools in a programmer’s arsenal.

If you have ever attempted to create your own regular expression to match only alphabets and spaces, you might find this article useful.

/^[a-zA-Z ]*$/


  • ABC D
  • ABCD
  • ABC d
  • ¬†ABC


See Also:

Regex Is Copied!