Regular Expression To Match Camel Case Text

A regular expression that can match camel case strings, where the word in a string starts with a lowercase letter but with an uppercase letter for the last word.

/[a-z]+((\d)|([A-Z0-9][a-z0-9]+))*([A-Z])?/g

Matches:

  • camelCaseText
  • regexPatten
  • regexPattenCom

Non-matches:

  • CamelCaseText
  • RegexPatten