Regex To Check If A String Starts And Ends With An Alphabetic Character

Category: Strings

A Regular Expression to validate and match a string that starts and ends with an alphabetic character.

/^[a-z].*[a-z]$/igm

Matches:

  • abcd
  • regex pattern
  • regexpattern

Non-matches:

  • Regexpattern1
  • 2Regexpattern

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.