I searched for the meaning of these expressions but couldn\'t understand the exact difference between them. This is what they say:
?:
Match expres
This is the real difference:
>>> re.match('a(?=b)bc', 'abc')
>>> re.match('a(?:b)c', 'abc')
# note:
>>> re.match('a(?=b)c', 'abc')
None
If you dont care the content after "?:" or "?=", "?:" and "?=" are just the same. Both of them are ok to use.
But if you need those content for further process(not just match the whole thing. In that case you can simply use "a(b)") You have to use "?=" instead. Cause "?:"will just through it away.