diff options
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r-- | Doc/library/re.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index b5a8883..75119a0 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -1450,8 +1450,8 @@ Finding all Adverbs ^^^^^^^^^^^^^^^^^^^ :func:`findall` matches *all* occurrences of a pattern, not just the first -one as :func:`search` does. For example, if one was a writer and wanted to -find all of the adverbs in some text, he or she might use :func:`findall` in +one as :func:`search` does. For example, if a writer wanted to +find all of the adverbs in some text, they might use :func:`findall` in the following manner:: >>> text = "He was carefully disguised but captured quickly by police." @@ -1465,8 +1465,8 @@ Finding all Adverbs and their Positions If one wants more information about all matches of a pattern than the matched text, :func:`finditer` is useful as it provides :ref:`match objects <match-objects>` instead of strings. Continuing with the previous example, if -one was a writer who wanted to find all of the adverbs *and their positions* in -some text, he or she would use :func:`finditer` in the following manner:: +a writer wanted to find all of the adverbs *and their positions* in +some text, they would use :func:`finditer` in the following manner:: >>> text = "He was carefully disguised but captured quickly by police." >>> for m in re.finditer(r"\w+ly", text): |