Parsing date and time using regex from a chuck of string
<p>EDIT: DONE ALREADY! THANKS</p>

<p>Code as below:</p>

<p>import ast,re</p>

<pre><code>a = "('=====================================', '30/06/2016 17:15 T001 -------------------------------')"

t=ast.literal_eval(a)

z=re.compile(r"(\d\d/\d\d/\d\d\d\d)\s(\d\d:\d\d)")

m = z.match(t[1])

if m:
    print("date: {}, time {}".format(m.group(1),m.group(2)))
</code></pre>

<p>You can iterate list items, and match those items.</p>

<pre><code>t = ast.literal_eval(a)  # assuming `t` is an iterable
z = re.compile(r"(\d\d/\d\d/\d\d\d\d)\s(\d\d:\d\d)")
for item in t:   # &lt;-----
    m = z.match(item)
    if m:
        print("date: {}, time {}".format(m.group(1), m.group(2)))
        # break  # if you want to get only the first matched data/time pair
</code></pre>

python regex