syntax incorrect with regex

Diez B. Roggisch deetsNOSPAM at web.de
Fri Mar 18 09:11:55 EST 2005


sam 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

No problem here. Is your indentation correct?


-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list