Meta Characters Flashcards
Any Digit 0-9
\d
Any word Character
A-Z
a-z
0-9
\w
Any White Space
\s
Space
Tab
Matches any character
.
Non-white space
\S
Anything not a word character
\W
Quantifiers
meta characters that modify the previous character in the regex to say how many of those things you want to match in a row.
Quantifiers Match ("0" zero or more) of the preceding meta character
*
Quantifiers Match (one or more) of the preceding meta character
+
Quantifiers
Match “0” zero or one of the preceding meta character
?
Quantifiers
Match “n” number of the preceding meta character
{n}
Quantifiers
{min,max}
Match “min,max” number of the preceding meta character
I want to find all 5 letter words in my text.
\w{5}
Positions
The beginning of a line
Positions
The end of a line
$
Positions
Word boundary
\b
Match all words at the beginning of a line.
^\w+
Match all words at the end of a line.
\w+$
Match all words
\w+