Using regex to match words and numbers with whitespaces
<p>I am trying to create a regex pattern that would match the following:</p>

<pre><code>Updated x word word
</code></pre>

<p><code>x</code> = being a number, e.g. 2</p>

<p>I have tried the following:</p>

<pre><code>(Updated\s\d\s\w\s\w)
</code></pre>

<p>For example, I would like: <code>Updated 2 mins ago</code>, to match.</p>

<p>But it doesn't seem to work: <a href="http://regexr.com/3ef05" rel="nofollow">http://regexr.com/3ef05</a></p>

<p>Try this :</p>

<pre><code>(Updated\s\d+\s\w+\s\w+)
</code></pre>

<p>The <code>+</code> means "one or more characters of this type", which is probably what you need here.</p>

<p>See it here : <a href="http://regexr.com/3ef0b" rel="nofollow">http://regexr.com/3ef0b</a></p>

python regex python-2.7