Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27317
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Subject | Re: Regex Question |
| Date | 2012-08-18 13:30 -0400 |
| Organization | > Bestiaria Support Staff < |
| References | <385e732e-1c02-4dd0-ab12-b92890bbed66@o3g2000yqp.googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3464.1345311306.4697.python-list@python.org> (permalink) |
On Fri, 17 Aug 2012 21:41:07 -0700 (PDT), Frank Koshti
<frank.koshti@gmail.com> declaimed the following in
gmane.comp.python.general:
> 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>
>
That looks like HTML... DON'T USE regular expressions -- use an HTML
parser (or for well-formed XHTML, an XML parser -- element-tree or
such), and walk the resultant structure...
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Regex Question Frank Koshti <frank.koshti@gmail.com> - 2012-08-17 21:41 -0700
Re: Regex Question Chris Angelico <rosuav@gmail.com> - 2012-08-18 15:42 +1000
Re: Regex Question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-18 11:50 +0100
Re: Regex Question Roy Smith <roy@panix.com> - 2012-08-18 09:08 -0400
Re: Regex Question Frank Koshti <frank.koshti@gmail.com> - 2012-08-18 07:21 -0700
Re: Regex Question Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-18 14:22 +0000
Re: Regex Question Frank Koshti <frank.koshti@gmail.com> - 2012-08-18 07:53 -0700
Re: Regex Question Peter Otten <__peter__@web.de> - 2012-08-18 17:48 +0200
Re: Regex Question Frank Koshti <frank.koshti@gmail.com> - 2012-08-18 08:56 -0700
Re: Regex Question Vlastimil Brom <vlastimil.brom@gmail.com> - 2012-08-18 17:50 +0200
Re: Regex Question Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2012-08-18 19:22 +0300
Re: Regex Question Frank Koshti <frank.koshti@gmail.com> - 2012-08-18 13:18 -0700
Re: Regex Question python@bdurham.com - 2012-08-18 12:36 -0400
Re: Regex Question Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-18 13:30 -0400
csiph-web