On 18/08/2012 06:42, Chris Angelico wrote:
On Sat, Aug 18, 2012 at 2:41 PM, Frank Koshti <frank.kos...@gmail.com> wrote:
Hi,

I'm new to regular expressions. I want to be able to match for tokens
with all their properties in the following examples. I would
appreciate some direction on how to proceed.


<h1>@foo1</h1>
<p>@foo2()</p>
<p>@foo3(anything could go here)</p>

You can find regular expression primers all over the internet - fire
up your favorite search engine and type those three words in. But it
may be that what you want here is a more flexible parser; have you
looked at BeautifulSoup (so rich and green)?

ChrisA


Totally agree with the sentiment. There's a comparison of python parsers here http://nedbatchelder.com/text/python-parsers.html

--
Cheers.

Mark Lawrence.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to