Skip to content

Instantly share code, notes, and snippets.

@r-winkler
Last active October 17, 2016 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r-winkler/48fe5f94f2d193c1ed4427af04bf2aea to your computer and use it in GitHub Desktop.
Save r-winkler/48fe5f94f2d193c1ed4427af04bf2aea to your computer and use it in GitHub Desktop.
# Anchors
^ Start of string
$ End of string
# Ranges
[A-Za-z] any letter
[0-9] any digit
[349] matches 3, 4 or 9
[^5] any character except 5 (negation)
# Boundaries
\s whitespace
\S non-whitespace
\b word boundary
\B non-word boundary
# Quantifiers
* zero or more times
? zero or one time
+ one or more times
{n} exactly n times
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment