Skip to content

Instantly share code, notes, and snippets.

@s0md3v
Created November 30, 2022 17:05
Show Gist options
  • Save s0md3v/b051e6e8f9f4a089dc443b686cc0bcd6 to your computer and use it in GitHub Desktop.
Save s0md3v/b051e6e8f9f4a089dc443b686cc0bcd6 to your computer and use it in GitHub Desktop.

Revisions

  1. s0md3v created this gist Nov 30, 2022.
    18 changes: 18 additions & 0 deletions regex
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    b match b
    b+ is match bbbbbbbbbbbbbbbbbbbbbbbbb
    + is 1 or more matches
    [bd] is match b d
    [bd]+ is match bbbdddbbdbdbdbdbdbd, bbbbbddddddd, bbbbbbbbbb, dddddddddddd
    b* bbbbbbbbbbbbbbbbbbbbbbbbb
    * is 0 or more matches
    [^x] matches everything but x
    (ab+|bc+) will match both abbbbbbb and bccccccccccc, its a OR statement
    0123456789 \d
    abcd....xyz a-z
    ABC------XYZ A-Z
    \s whitespaces like spaces, tabs
    \n for newlines
    . is for everything
    ? is for optional
    aaaaaaaaaaaa{10,35}
    aaaa{10,}