searching backwards in a string

Mark McEahern marklists at mceahern.com
Tue Feb 12 22:24:29 CET 2002


[Paul Rubin]
> Thanks but I don't think that solution works if the pattern being
> searched for is a complicated regexp.  Even if the pattern is a simple
> string, it has to be reversed too.

That's probably true.  Would you be so kind as to post an example of the
input (string, complicated regexp) and output (do you want it to tell you
the starting position from left to right of the first match found backwards
in the string?) you'd expect?

Thanks,

// mark





More information about the Python-list mailing list