[Tutor] how to match regular expression from right to left

王超 daniel.chaowang at gmail.com
Sun Sep 16 15:01:01 CEST 2007


hi,

I want to match the regular expression from right to left, such as:

TAG_pattern = re.compile(r"(us::.*) .*(1002|1003).*$")
TAG_pattern.search(line)

Does the search method support this?

Thanks,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070916/14b79cf2/attachment.htm 


More information about the Tutor mailing list