Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'expressions': 0.07; 'parser': 0.07; 'subject:Question': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'aug': 0.13; 'expressions.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; '(or': 0.18; 'properties': 0.24; 'looks': 0.26; 'skip:@ 10': 0.27; 'regular': 0.27; 'header:X-Complaints-To:1': 0.28; "i'm": 0.29; 'fri,': 0.30; 'could': 0.32; 'url:home': 0.33; 'to:addr:python- list': 0.33; 'hi,': 0.33; 'direction': 0.35; 'received:org': 0.36; 'charset:us-ascii': 0.36; 'xml': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'walk': 0.71; 'frank': 0.75; 'examples.': 0.84; 'dennis': 0.91; 'received:108': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Regex Question Date: Sat, 18 Aug 2012 13:30:20 -0400 Organization: > Bestiaria Support Staff < References: <385e732e-1c02-4dd0-ab12-b92890bbed66@o3g2000yqp.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-68-179-133.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345311306 news.xs4all.nl 6920 [2001:888:2000:d::a6]:54157 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27317 On Fri, 17 Aug 2012 21:41:07 -0700 (PDT), Frank Koshti 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. > > >

@foo1

>

@foo2()

>

@foo3(anything could go here)

> 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/