syntax incorrect with regex
Swaroop C H
swaroopch at gmail.com
Fri Mar 18 11:20:08 EST 2005
On Fri, 18 Mar 2005 21:57:15 +0800, sam <sam.wun at authtec.com> wrote:
> Hi,
>
> What is the correct syntax of declaring a regex syntax in Python 2.3?
> I got the following error:
>
> # python2.3 test.py
> File "test.py", line 10
> macros_parser = re.compile (r""" (\s+)=\"(\s+)\"$ """,re.VERBOS)
> ^
> SyntaxError: invalid syntax
Please check the indentation you have used.
Also, it should be re.VERBOSE (note the ending 'e')
Regards,
--
Swaroop C H
Blog: http://www.swaroopch.info
Book: http://www.byteofpython.info
More information about the Python-list
mailing list