mirror of
https://github.com/python/cpython.git
synced 2025-09-30 20:31:52 +00:00
[3.6] bpo-26656: Improve re.compile documentation (GH-3211) (GH-3225)
- Link to the regular expressions object documentation
- Clarify that it can be used with more than the two methods currently stated.
(cherry picked from commit ed94a8b285
)
This commit is contained in:
parent
5c89c2fd8a
commit
83e5c888ff
1 changed files with 4 additions and 3 deletions
|
@ -490,9 +490,10 @@ form.
|
||||||
|
|
||||||
.. function:: compile(pattern, flags=0)
|
.. function:: compile(pattern, flags=0)
|
||||||
|
|
||||||
Compile a regular expression pattern into a regular expression object, which
|
Compile a regular expression pattern into a :ref:`regular expression object
|
||||||
can be used for matching using its :func:`~regex.match` and
|
<re-objects>`, which can be used for matching using its
|
||||||
:func:`~regex.search` methods, described below.
|
:func:`~regex.match`, :func:`~regex.search` and other methods, described
|
||||||
|
below.
|
||||||
|
|
||||||
The expression's behaviour can be modified by specifying a *flags* value.
|
The expression's behaviour can be modified by specifying a *flags* value.
|
||||||
Values can be any of the following variables, combined using bitwise OR (the
|
Values can be any of the following variables, combined using bitwise OR (the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue