Use regex to match 5 num, dot, 1 num, dot, 5 num
<p>I'm trying to create regex to match the following pattern:</p>

<pre><code>00000.1.17372
</code></pre>

<p>i.e: <code>5 Numbers DOT 1 Number DOT 5 Numbers</code></p>

<p>I have tried the following re.match:</p>

<pre><code>find = re.match('d{5}.d{1}.d{5}', string)
</code></pre>

<p>In context:</p>

<pre><code>import re

string = "{u'blabla': u'asdf', u'dd': u'a', u'cotry': u'jjK', u'l': u'/q/iii:00000.1.17372', u'stfe': u'', u'fdfhdiufhi': u'GB', u'y_name': u'Unitm', u'mw': u'00000.1.17372'}"

find = re.match('d{5}.d{1}.d{5}', string)

print find
</code></pre>

<p>However, this doesn't seem to work, as the output is:</p>

<pre><code>None
</code></pre>

<p>The pattern you want is:</p>

<pre><code>\d{5}\.\d\.\d{5}
</code></pre>

<p>You need to escape the dots and use the proper token for a number, which is <code>\d</code>.</p>

python regex python-2.7