Regular Expression To Match Month Name

A regular expression that matches month names. Supports both full month names and 3-letter abbreviations. So you can easily check if the user inputs a valid month name or not.

/\b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|(Nov|Dec)(?:ember)?)/g

Matches:

  • Feb
  • February
  • December
  • February March

Non-matches:

  • Fe
  • Febr

See Also: