Skip to content

Instantly share code, notes, and snippets.

@dreampowder
Created January 9, 2014 16:23
Show Gist options
  • Save dreampowder/8337031 to your computer and use it in GitHub Desktop.
Save dreampowder/8337031 to your computer and use it in GitHub Desktop.
[aeiou] - matches exactly one lowercase vowel
[^aeiou] - matches a character that ISN'T a lowercase vowel (negated character class)
^[aeiou] - matches a lowercase vowel anchored at the beginning of the line
[^^] - matches a character that isn't a caret/'^'
^[^^] - matches a character that isn't a caret at the beginning of line
^[^.]. - matches anything but a literal period, followed by "any" character, at the beginning of line
[a-z] - matches exactly one character within the range of 'a' to 'z' (i.e. all lowercase letters)
[az-] - matches either an 'a', a 'z', or a '-' (literal dash)
[.*]* - matches a contiguous sequence (possibly empty) of dots and asterisks
[aeiou]{3} - matches 3 consecutive lowercase vowels (all not necessarily the same vowel)
\[aeiou\] - matches the string "[aeiou]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment