Ask for help on using re

Jon Ribbens jon+usenet at unequivocal.eu
Fri Aug 6 10:44:19 EDT 2021


On 2021-08-06, jak <nospam at please.ty> wrote:
> Il 06/08/2021 16:17, jak ha scritto:
>> Il 06/08/2021 12:57, Jach Feng ha scritto:
>>> That's an interest solution! Where the '|' operator in re.compile() 
>>> was documented?
>> 
>> I honestly can't tell you, I've been using it for over 30 years. In any
>> case you can find some traces of it in the "regular expressions quick
>> reference" on the site https://regex101.com (bottom right side).
>
> ...if I'm not mistaken, the '|' it is part of normal regular
> expressions, so it is not a specific extension of the python libraries.
> Perhaps this is why you don't find any documentation on it.

The Python documentation fully describes the regular expression syntax
that the 're' module supports, including features that are widely
supported by different regular expression systems and also Python
extensions. '|' is documented here:
https://docs.python.org/3/library/re.html#index-13


More information about the Python-list mailing list