Cheatsheet Pages / Regex Cheatsheet
How to match whole words only in regex — \b word boundary
You want cat, but not cats, concat, or educate.
Patterns use the syntax shared by PCRE / Python / JavaScript; engine differences are flagged in the cheatsheet where they matter. Test any pattern at regex101.com — and pick the matching engine.
\bcat\b
# matches "cat" but not "cats", "concat", or "educate"
