On 12/31/04 03:00 AM CST, "Paul McGuire" <[EMAIL PROTECTED]>
sayeth:
> Assuming that your <td> tag wont contain any nested <td> tag, you
> could define your data content as "everything up until I find
> '</td>'". For this you can use pyparsing's SkipTo element. I think
> if you define data as:
> data = SkipTo("</td>")
> then your code should start working better.
Hey! It does! ;) I just worked up (note to googlers- don't do this):
goodchars=printables.replace("<", "")
good_ab="<" + (~Literal(r"""/td>""") + SkipTo(">", include=True))
good_ab.setDebug(True)
simple=Word(goodchars)
complex=Combine(simple | good_ab, adjacent=False, joinString="")
data=Combine(OneOrMore(complex), adjacent=False, joinString=" ")
title4=title_open+data
But that would break for closers with more than one ">". Need to stop
thinking like these are regexps. Thanks - this is a great tool. ;)
--
Peter Fein [EMAIL PROTECTED] 773-575-0694
Basically, if you're not a utopianist, you're a schmuck. -J. Feldman
--
http://mail.python.org/mailman/listinfo/python-list