searching backwards in a string
phr-n2002a at nightsong.com
Wed Feb 13 04:46:36 CET 2002
"Steve Holden" <sholden at holdenweb.com> writes:
> Paul, this thread's probably now old enough for you to tell us what the real
> problem is! Why exactly do you need to search backwards from the 50,000th
> character to find the beginning of an HTML tag?
Suppose I'm parsing the file and I see a </table> tag and I want to
find the matching <table> tag. It could be pretty far back in the file.
That's what I was doing when I encountered this question. But searching
backwards is a normal thing to want to do in general--for example it's
a standard command in any decent text editor.
Anyway, I just entered a sourceforge bug about it being missing from
Python's re module.
More information about the Python-list