Regular Expression To Match Single Letter

Category: Strings

A Regular Expression that matches a single letter (uppercase or lowercase).

/^[a-zA-Z]$/

Matches:

  • A
  • b
  • C

Non-matches:

  • abc
  • 123
  • a12

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Expression Flags

Flags Description
i Ignore case sensitive.
g Allows global search.
m Allows multiline search.