Skip to content

Instantly share code, notes, and snippets.

@s0md3v
Created November 30, 2022 17:05
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 s0md3v/b051e6e8f9f4a089dc443b686cc0bcd6 to your computer and use it in GitHub Desktop.
Save s0md3v/b051e6e8f9f4a089dc443b686cc0bcd6 to your computer and use it in GitHub Desktop.
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,}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment