Stupid Regex Question
Noah from IT Goes Click
newsuser at itgoesclick.com
Wed Apr 21 16:15:11 EDT 2004
small loop problem?
Jonas Galvez wrote:
> I'm feeling dumb:
>
> str = "<tag>text<innertag>moretext</innertag></tag><tag>text</tag>"
>
> How can I get a list like ["text<innertag>moretext</innertag>",
> "text"] using regexes? I'm starting to believe it's not possible.
>
> Yeah, I know about the terror stories about using regexes to parse
> HTML, but in this particular case, using a SAX parser would be an
> horrendous overhead (I mean, it's a ridiculously simple string).
>
>
>
> =-
> Jonas Galvez
> jonasgalvez.com/blog
> macromedia.com/go/team
>
>
>
>
>
More information about the Python-list
mailing list