I have a regex expression which gets validated in python 2.7 but shows as invalid syntax in python 3.5
$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> a = re.compile(ur"^([^[?]+)(\[\])?(\?)?$")
>>>
$ python3.5
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> a = re.compile(ur"^([^[?]+)(\[\])?(\?)?$")
File "<stdin>", line 1
a = re.compile(ur"^([^[?]+)(\[\])?(\?)?$")