Skip to content

Instantly share code, notes, and snippets.

@kaayce
Created March 3, 2022 07:10
Show Gist options
  • Select an option

  • Save kaayce/2d539ba169eaa6e801e02ff38c8f22a1 to your computer and use it in GitHub Desktop.

Select an option

Save kaayce/2d539ba169eaa6e801e02ff38c8f22a1 to your computer and use it in GitHub Desktop.

Revisions

  1. kaayce created this gist Mar 3, 2022.
    24 changes: 24 additions & 0 deletions regex.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    . - Any Character Except New Line
    \d - Digit (0-9)
    \D - Not a Digit (0-9)
    \w - Word Character (a-z, A-Z, 0-9, _)
    \W - Not a Word Character
    \s - Whitespace (space, tab, newline)
    \S - Not Whitespace (space, tab, newline)

    \b - Word Boundary
    \B - Not a Word Boundary
    ^ - Beginning of a String
    $ - End of a String

    [] - Matches Characters in brackets
    [^ ] - Matches Characters NOT in brackets
    | - Either Or
    ( ) - Group

    Quantifiers:
    * - 0 or More
    + - 1 or More
    ? - 0 or One
    {3} - Exact Number
    {3,4} - Range of Numbers (Minimum, Maximum)