Skip to content

Instantly share code, notes, and snippets.

@ziishaned
Last active March 28, 2018 13:18
Show Gist options
  • Save ziishaned/3232a614e33f829e9fadf0f8ad91c32b to your computer and use it in GitHub Desktop.
Save ziishaned/3232a614e33f829e9fadf0f8ad91c32b to your computer and use it in GitHub Desktop.
Meta Characters
Meta character Description
. Period matches any single character except a line break.
[ ] Character class. Matches any character contained between the square brackets.
[^ ] Negated character class. Matches any character that is not contained between the square brackets
* Matches 0 or more repetitions of the preceding symbol.
+ Matches 1 or more repetitions of the preceding symbol.
? Makes the preceding symbol optional.
{n,m} Braces. Matches at least "n" but not more than "m" repetitions of the preceding symbol.
(xyz) Character group. Matches the characters xyz in that exact order.
| Alternation. Matches either the characters before or the characters after the symbol.
\ Escapes the next character. This allows you to match reserved characters [ ] ( ) { } . * + ? ^ $ \ |
^ Matches the beginning of the input.
$ Matches the end of the input.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment