Regex Cheat Sheet/Non-word boundary

Match where a word boundary does not occur.

Section: Anchors and Boundaries

Non-word boundary

regex
regex
\B
Explanation

Useful for matching substrings that must stay inside a larger token.

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
Word boundary
Match a transition between word and non-word characters.
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