Regex Symbols Flashcards
1
Q
What does ^ represent (Regex)?
A
Start of a string
2
Q
What does $ represent (Regex)?
A
End of a string
3
Q
What does {…} represent (Regex)?
A
Quantifier notation.
E.g “^[A-Z]*{12}$” requires 12 characters
4
Q
What does . represent (Regex)?
A
Any character
5
Q
What does | represent (Regex)?
A
Or
6
Q
What does * represent (Regex)?
A
0 or more of previous character
7
Q
What does + represent (Regex)?
A
1 or more of previous character
8
Q
What does ? represent (Regex)?
A
0 or 1 of previous character
9
Q
What does […] represent (Regex)?
A
Explicit set of characters
E.g “^[A-Z]{2}$”
10
Q
What does \ represent (Regex)?
A
Makes next character literal instead of special.
E.g * means it will look for “*”