Python Regex matching any order
<p>Lets say I have datetime in the format</p>

<pre><code>12 September, 2016
September 12, 2016
2016 September, 12
</code></pre>

<p>I need regex like it should return match in same order always for any dateformat given above</p>

<pre><code>match-1 : 12
match-2 : September
match-3 : 2016
</code></pre>

<p>I need results in the same order always. </p>

<p>You cannot change group orderings. You need to do a "or" of 3 patterns and then pass through the result to determine which group mapped to what, which should be pretty simple.</p>

python regex datetime match