Regular expression help needed

Torkil Grindstein torkil at
Tue Sep 17 05:03:30 EDT 2002


It's been a while since I played around with regexps, and I
realize that I really need some help here.

Mission: I have a string containing a whole WML document. I want
to extract data from following occurences:

<meta name="michael" content="owen"/>

That is, I want to extract the content of any occurences of
the meta "michael" key. There may be several occurences in one
<meta name="michael" content="owen"/>
<meta name="michael" content="jackson"/>
will give me the results "owen" and "jackson".

Of course, it is possible that the document has written the
tags in uppercase (META Name, META NAME, etc), but I could
lowercase the whole document string prior to searching. (The
content is case insensitive for my purposes.)

I would really be glad if someone out there took this challenge..:)


More information about the Python-list mailing list