syntax incorrect with regex

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Fri Mar 18 10:04:16 EST 2005


On Fri, 18 Mar 2005 21:57:15 +0800, rumours say that sam <sam.wun at authtec.com>
might have written:

>     macros_parser = re.compile (r""" (\s+)=\"(\s+)\"$ """,re.VERBOS)
>     ^
>SyntaxError: invalid syntax

Like Diez already said, your problem is probably mixing of tabs with spaces or
bad indentation in general.  The "^" character points at the start of your line,
and errors in regular expressions typically raise sre.error, not SyntaxError.

Is this part of a script or does it come from the command line?  If the latter,
don't insert any spaces at the start of your line; if the former, compare
indentation with the line above.
-- 
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...



More information about the Python-list mailing list