Regular Expression Python3---why
<p>I have written the following python code </p>

<pre><code>import re

def get_items():
    text = '''
    &lt;a href="/archive/q-fin"&gt;Quantitative Finance&lt;/a&gt;
    &lt;a href="/archive/stat"&gt;Statistics&lt;/a&gt;
    &lt;a href="/help/general"&gt;General information&lt;/a&gt;
    &lt;a href="/help/support"&gt;Support and Governance Model&lt;/a&gt;
    &lt;a href="/help/find"&gt;Find&lt;/a&gt;
    '''
    pattern = re.compile(r'&lt;a href="/archive/(.*?)"&gt;(.*?)&lt;/a&gt;', re.S)
    items = re.match(pattern, text).group(1)
    print(items)

get_items()
</code></pre>

<p>but it does't work,why?</p>

<p>the regular expression as follws:</p>

<pre><code>pattern = re.compile(r'&lt;a href="/archive/(.*?)"&gt;(.*?)&lt;/a&gt;', re.S)
</code></pre>