Short, perfect program to read sentences of webpage

MRAB python at mrabarnett.plus.com
Wed Dec 8 20:31:13 EST 2021


On 2021-12-08 23:17, Stefan Ram wrote:
> Cameron Simpson <cs at cskk.id.au> writes:
>>Instead, consider the \b (word boundary) and \w (word character) 
>>markers, which will let you break strings up, and then maybe test the 
>>results with str.isupper().
> 
>    Thanks for your comments, most or all of them are
>    valid, and I will try to take them into account!
> 
>    Regexps might have their disadvantages, but when I use them,
>    it is clearer for me to do all the matching with regexps
>    instead of mixing them with Python calls like str.isupper.
>    Therefore, it is helpful for me to have a regexp to match
>    upper and lower case characters separately. Some regexp
>    dialects support "\p{Lu}" and "\p{Ll}" for this.
> 
If you want "\p{Lu}" and "\p{Ll}", have a look at the 'regex' module on 
PyPI:

     https://pypi.org/project/regex/

[snip]


More information about the Python-list mailing list