Regex Question

Chris Angelico rosuav at gmail.com
Sat Aug 18 01:42:26 EDT 2012


On Sat, Aug 18, 2012 at 2:41 PM, Frank Koshti <frank.koshti at 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



More information about the Python-list mailing list