Browse

Regular Expression Tokens and Their Meanings

Master what each common regular-expression token, anchor, and metacharacter matches.

Code37 items4 levelsDifficulty 3/5
Start training →

Free · no signup · works on any device

Levels

Start easy — harder levels unlock as you improve, or jump ahead anytime.

1
Basics
9 items
2
Quantifiers & Anchors
10 items
3
Classes & Groups
9 items
4
Advanced
9 items

All 37 cards

.
any single character (except newline)
\d
any digit (0-9)
\D
any non-digit
\w
any word character (letter, digit, underscore)
\W
any non-word character
\s
any whitespace character
\S
any non-whitespace character
\n
newline
\t
tab
*
zero or more of the preceding
+
one or more of the preceding
?
zero or one of the preceding (optional)
{n}
exactly n of the preceding
{n,}
n or more of the preceding
{n,m}
between n and m of the preceding
^
start of string or line
$
end of string or line
\b
word boundary
\B
non-word boundary
[abc]
any one of a, b, or c
[^abc]
any character except a, b, or c
[a-z]
any lowercase letter a through z
[0-9]
any digit 0 through 9
|
alternation (or)
(abc)
capturing group
(?:abc)
non-capturing group
\1
backreference to group 1
\.
a literal dot
(?=abc)
positive lookahead
(?!abc)
negative lookahead
(?<=abc)
positive lookbehind
(?<!abc)
negative lookbehind
*?
lazy zero or more (non-greedy)
+?
lazy one or more (non-greedy)
(?<name>abc)
named capturing group
\A
start of string only
\Z
end of string only

Keep going

Useful Bash One-Liners

Learn what common Bash commands and one-liners actually do, in both directions.

Code32 items

Vim Commands and Motions

Learn what essential Vim commands and motions do, from basic movement to powerful editing.

Code42 items

Common Git Commands and What They Do

Learn the essential Git commands and the action each one performs.

Code30 items

Essential Linux/Unix Terminal Commands

Master the core Linux and Unix shell commands and recall exactly what each one does.

Code40 items