Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c0d322

Browse files
author
Skip Montanaro
committed
tightened up the definition of \b and \B some more based upon discussion
after the last checkin.
1 parent 522076d commit 2c0d322

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

Doc/lib/libre.tex

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
324324
beginning 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
334338
equivalent to the set \regexp{[0-9]}.

0 commit comments

Comments
 (0)