Merge pull request #224 from baihu/patch-1
Update p07_specify_regexp_for_shortest_match.rst
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> str_pat = re.compile(r'\"(.*)\"')
|
||||
>>> str_pat = re.compile(r'"(.*)"')
|
||||
>>> text1 = 'Computer says "no."'
|
||||
>>> str_pat.findall(text1)
|
||||
['no.']
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> str_pat = re.compile(r'\"(.*?)\"')
|
||||
>>> str_pat = re.compile(r'"(.*?)"')
|
||||
>>> str_pat.findall(text2)
|
||||
['no.', 'yes.']
|
||||
>>>
|
||||
|
||||
Reference in New Issue
Block a user