Regex Cheat Sheet/Word boundary

Match a transition between word and non-word characters.

Section: Anchors and Boundaries

Word boundary

regex
regex
\b
Explanation

Common for matching whole words like `\berror\b`.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Anchors and Boundaries
Non-word boundary
Match where a word boundary does not occur.
OpenIn sheetregexsame section
Start of string
Match only at the beginning of the input.
OpenIn sheetregexsame section
End of string
Match only at the end of the input.
OpenIn sheetregexsame section
Absolute start anchor
Match only at the absolute start of the entire string.
OpenIn sheetregexsame section
Absolute end anchor
Match only at the absolute end of the entire string.
OpenIn sheetregexsame section
Word character
Match a word character.
OpenIn sheetregex1 tag match