diff options
author | Mariatta <Mariatta@users.noreply.github.com> | 2017-08-28 05:50:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-28 05:50:08 (GMT) |
commit | 83e5c888fff2bf3663952b2bfd3a3ee6c20386ef (patch) | |
tree | 99c4f6720aeed7a28f39a85ed8bad1640207930d /Doc | |
parent | 5c89c2fd8a0be0ad2f89f084775c5f9f76687237 (diff) | |
download | cpython-83e5c888fff2bf3663952b2bfd3a3ee6c20386ef.zip cpython-83e5c888fff2bf3663952b2bfd3a3ee6c20386ef.tar.gz cpython-83e5c888fff2bf3663952b2bfd3a3ee6c20386ef.tar.bz2 |
[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 ed94a8b2851914bcda3a77b28b25517b8baa91e6)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/re.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 5ae304d..7a51abd 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -490,9 +490,10 @@ form. .. function:: compile(pattern, flags=0) - Compile a regular expression pattern into a regular expression object, which - can be used for matching using its :func:`~regex.match` and - :func:`~regex.search` methods, described below. + Compile a regular expression pattern into a :ref:`regular expression object + <re-objects>`, which can be used for matching using its + :func:`~regex.match`, :func:`~regex.search` and other methods, described + below. 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 |