Skip to content

Commit b534eaa

Browse files
authored
Merge pull request yidao620c#224 from baihu/patch-1
Update p07_specify_regexp_for_shortest_match.rst
2 parents bec08b4 + b8b80a5 commit b534eaa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/c02/p07_specify_regexp_for_shortest_match.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
.. code-block:: python
1818
19-
>>> str_pat = re.compile(r'\"(.*)\"')
19+
>>> str_pat = re.compile(r'"(.*)"')
2020
>>> text1 = 'Computer says "no."'
2121
>>> str_pat.findall(text1)
2222
['no.']
@@ -33,7 +33,7 @@
3333

3434
.. code-block:: python
3535
36-
>>> str_pat = re.compile(r'\"(.*?)\"')
36+
>>> str_pat = re.compile(r'"(.*?)"')
3737
>>> str_pat.findall(text2)
3838
['no.', 'yes.']
3939
>>>

0 commit comments

Comments
 (0)