On Feb 1, 9:33 am, "Edward K. Ream" <[email protected]> wrote:
> Ah, the existential pleasures of engineering :-) You gotta love this stuff.
Well, maybe that was an over-statement :-) There remains a question
about what \s matches in a regex. The python docs say:
QQQ
\s
When the LOCALE and UNICODE flags are not specified, matches any
whitespace character; this is equivalent to the set [ \t\n\r\f\v].
With LOCALE, it will match this set plus whatever characters are
defined as space for the current locale. If UNICODE is set, this will
match the characters [ \t\n\r\f\v] plus whatever is classified as
space in the Unicode character properties database.
QQQ
But an experiment seems to show that \s also matches the end of a
string. For example, get_directives_dict *does* recognize a directive
at the very end of a body text (or, presumably, a headline), even with
the \s appended to the regex.
In fact, this is what I want, but is it valid to rely on this apparent
fact? Leo's operation depends on it.
Does anyone know for sure?
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.