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
User Review
( votes)Expression Flags
Flags | Description |
---|---|
i |
Ignore case sensitive. |
g |
Allows global search. |
m |
Allows multiline search. |