File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1808,7 +1808,7 @@ one as :func:`search` does. For example, if a writer wanted to
18081808find all of the adverbs in some text, they might use :func: `findall ` in
18091809the following manner::
18101810
1811- >>> text = "He was carefully disguised but captured quickly by police."
1811+ >>> text = "He was carefully disguised but found quickly by police."
18121812 >>> re.findall(r"\w+ly\b", text)
18131813 ['carefully', 'quickly']
18141814
@@ -1822,11 +1822,11 @@ instead of strings. Continuing with the previous example, if a writer wanted
18221822to find all of the adverbs *and their positions * in some text, they would use
18231823:func: `finditer ` in the following manner::
18241824
1825- >>> text = "He was carefully disguised but captured quickly by police."
1825+ >>> text = "He was carefully disguised but found quickly by police."
18261826 >>> for m in re.finditer(r"\w+ly\b", text):
18271827 ... print('%02d-%02d: %s' % (m.start(), m.end(), m.group(0)))
18281828 07-16: carefully
1829- 40-47 : quickly
1829+ 37-44 : quickly
18301830
18311831
18321832Raw String Notation
You can’t perform that action at this time.
0 commit comments