Regular Expressions Flashcards
1
Q
*
A
0 or more
2
Q
+
A
1 or more
3
Q
?
A
0 or 1
4
Q
A
beginning of string
5
Q
$
A
end of string
6
Q
.
A
any character (except newline)
7
Q
\b
A
word boundary (beginning and end), includes punctuation
8
Q
\B
A
within a word
9
Q
^\d{4}
A
sequence of exactly 4 digits
10
Q
\d
A
digit
11
Q
\D
A
non-digit
12
Q
\s
A
whitespace character
13
Q
\S
A
non-whitespace character
14
Q
\w
A
alphanumeric or underscore [a-zA-Z0-9_]
15
Q
( | )
) | (
A
or