Regular Expressions 101

Match camelCase file names. Allows numbers and [], [[]] as first chars.

Open Workspace
  • JavaScript
  • Match
1

Regular Expression

/
^(?:[a-z][a-zA-Z]*|[0-9]+|\[{1,2}[a-zA-Z]*\]{1,2})(?:\.[a-z][a-zA-Z]+)*$
/
gm

Description

This regex is used to match file names with camelCase names only. It allows numbers and [...], [[...]] as first characters.

Submitted by Florent Catiau-Tristant