Boundaries match a position in a string without consuming any code points. There are 4 boundaries:
%matches a word boundary. It matches successfully if it is preceded, but not succeeded by a word character, or vice versa. For example,
Codepoint % Codepointmatches
;A, but not
!%matches a position that is not a word boundary. For example,
Codepoint !% Codepointmatches
::, but not
Start) matches the start of the string.
End) matches the end of the string.
A word character is anything that matches
[word]. If the regex engine is
Unicode-aware, this is
[Alphabetic Mark Decimal_Number Connector_Punctuation].
For some regex engines, Unicode-aware matching has to be enabled first
!% is never Unicode-aware, even when
u flag is set. See here for more information.