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

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: