Skip to content

Instantly share code, notes, and snippets.

@r-winkler
Last active October 17, 2016 08:02

Revisions

  1. r-winkler revised this gist Oct 17, 2016. 1 changed file with 12 additions and 2 deletions.
    14 changes: 12 additions & 2 deletions regex
    Original file line number Diff line number Diff line change
    @@ -3,9 +3,19 @@
    $ 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

    # Validating data
    * zero or more times
    ? zero or one time
    + one or more times
    {n} exactly n times
  2. r-winkler created this gist Oct 17, 2016.
    11 changes: 11 additions & 0 deletions regex
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # Anchors
    ^ Start of string
    $ End of string

    # Ranges

    # Boundaries

    # Quantifiers

    # Validating data