@@ -322,13 +322,17 @@ \subsection{Regular Expression Syntax \label{re-syntax}}
322322
323323\item [\code {\e b}] Matches the empty string, but only at the
324324beginning or end of a word. A word is defined as a sequence of
325- alphanumeric or underscore characters , so the end of a word is indicated by
326- whitespace or a non-alphanumeric, non-underscore character. Inside a character range,
327- \regexp {\e b} represents the backspace character, for compatibility with
328- Python's string literals.
329-
330- \item [\code {\e B}] Matches the empty string, but only when it is
331- \emph {not } at the beginning or end of a word.
325+ alphanumeric or underscore characters, so the end of a word is indicated by
326+ whitespace or a non-alphanumeric, non-underscore character. Note that
327+ {}\code {\e b} is defined as the boundary between \code {\e w} and \code {\e
328+ W}, so the precise set of characters deemed to be alphanumeric depends on the
329+ values of the \code {UNICODE} and \code {LOCALE} flags. Inside a character
330+ range, \regexp {\e b} represents the backspace character, for compatibility
331+ with Python's string literals.
332+
333+ \item [\code {\e B}] Matches the empty string, but only when it is \emph {not }
334+ at the beginning or end of a word. This is just the opposite of {}\code {\e
335+ b}, so is also subject to the settings of \code {LOCALE} and \code {UNICODE}.
332336
333337\item [\code {\e d}]Matches any decimal digit; this is
334338equivalent to the set \regexp {[0-9]}.
0 commit comments