Regular Expression Operators Flashcards
Operator:
.
Matches any single character.
Operator:
?
The preceding item is optional and will be matched, at most, once.
Operator:
*
The preceding item will be matched zero or more times.
Operator:
+
The preceding item will be matched one or more times.
Operator:
{N}
The preceding item is matched exactly N times.
Operator:
{N, }
The preceding item is matched N or more times.
Operator:
{N, M}
The preceding item is matched at least N times, but not more than M times.
Operator:
-
represents the range if it’s not first or last in a list or the ending point of a range in a list.
Operator:
Matches the empty string at the beginning of a line; also represents the characters not in the range of a list.
Operator:
$
Matches the empty string at the end of a line.
Operator:
\b
Matches the empty string at the edge of a word.
Operator:
\B
Matches the empty string provided it’s not at the edge of a word.
Operator:
\<
Match the empty string at the beginning of word.
Operator:
\>
Match the empty string at the end of word.