Reference

Cheat Sheet

The commands you keep forgetting, with a one-line description and a real example you can copy - 384 across 26 tools. Pick a tool in the sidebar, or search across all of them.

Regex

The building blocks of regular expressions, with a concrete match each.
CommandWhat it doesExample
.Any single character (except newline).a.c matches "abc", "a-c"
\dAny digit 0-9.\d+ matches "42" in "order 42"
\wA word character: letter, digit, or underscore.\w+ matches "user_1"
\sAny whitespace character.\s+ matches the gap in "a b"
^Anchor to the start of the line.^Error matches lines starting with "Error"
$Anchor to the end of the line.\.js$ matches "app.js"
*Zero or more of the previous token.ab* matches "a", "ab", "abbb"
+One or more of the previous token.\d+ matches "2024"
?Zero or one (makes it optional).colou?r matches "color" and "colour"
{n,m}Between n and m repetitions.\d{2,4} matches "12" and "2024"
[...]Any one character from the set.[aeiou] matches a single vowel
[^...]Any one character NOT in the set.[^0-9] matches a non-digit
(...)Group and capture for reuse.(\d{4})-(\d{2}) captures "2024" and "06"
(?:...)Group without capturing.(?:ab)+ matches "abab"
|Alternation: match either side.cat|dog matches "cat" or "dog"
\bA word boundary.\bcat\b matches "cat" but not "category"
\.A literal dot (escaped).\.com matches ".com"