[Python-checkins] python/dist/src/Doc/lib libre.tex,1.86,1.87
Skip Montanaro
skip@pobox.com
Sat, 7 Sep 2002 13:48:20 -0500
>> Didn't /F say that \b represent a boundary between \w and \W?
>>
>> \w can match more than just alphanumeric characters and underscore,
>> so the documentation is still not correct. I guess the \b
>> documentation should just refer to the \w/\W documentation.
Fredrik> let's see if I can sort this out:
...
Okay, here's what I'm checking in (sans LaTeX markup). Let me know if it
still needs revision.
* \b Matches the empty string, but only at the beginning or end of a
word. A word is defined as a sequence of alphanumeric or underscore
characters, so the end of a word is indicated by whitespace or a
non-alphanumeric, non-underscore character. Note that \b is defined
as the boundary between \w and \W, so the precise set of characters
deemed to be alphanumeric depends on the values of the UNICODE and
LOCALE flags. Inside a character range, \b represents the backspace
character, for compatibility with Python's string literals.
* \B Matches the empty string, but only when it is not at the beginning
or end of a word. This is just the opposite of \b, so is also subject
to the settings of LOCALE and UNICODE.
Thanks for the feedback,
Skip