Regexp syntax change in 1.6?
Adam Sampson
azz at gnu.org
Sat Sep 9 18:48:11 EDT 2000
Gareth.McCaughan at pobox.com (Gareth McCaughan) writes:
> > m = re.match(r"[a-z0-9]*://[^/]+/.*\.([^.#\?/]*)([#\?]?.*)?", url)
> > sre_constants.error: nothing to repeat
> For your actual case, the closing
>
> ([xyz]?.*)?
> (contents of charset changed for clarity) could be replaced
> with
> ([xyz]?.*)
Argh, yes, I should have spotted that one. (The kludge that I actually
did was to change the final .* to .*., which stopped SRE from
complaining.) It works perfectly now, anyway.
Thanks,
--
Adam Sampson
azz at gnu.org
More information about the Python-list
mailing list