The problem is how to implement conditions with regex. We have got this:
regex = '"Tom":{"c":(.+?),"b":(.+?),"a":(.+?)}|"Tom":{"a":(.+?),"c":(.+?),"b":(.+?)}'
We want to do different things to the regex based on which regex expression will be found. How do we encounter this? How do we access this with if statements?
Say: if regex[0]: print 'Hi'
else: print 'Hello'
Basically, I just don't know how to ask python which regex has been found and used.
I mean what'd the syntax be?