Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python
Re: What's the best way to write this regular expression?
 

Index | Next | Previous | View Flat


ian.g.kelly at gmail

Mar 6, 2012, 3:35 PM


Views: 498
Permalink
Re: What's the best way to write this regular expression? [In reply to]

On Tue, Mar 6, 2012 at 4:05 PM, John Salerno <johnjsal [at] gmail> wrote:
>> Anything that allows me NOT to use REs is welcome news, so I look forward to learning about something new! :)
>
> I should ask though...are there alternatives already bundled with Python that I could use? Now that you mention it, I remember something called HTMLParser (or something like that) and I have no idea why I never looked into that before I messed with REs.

HTMLParser is pretty basic, although it may be sufficient for your
needs. It just converts an html document into a stream of start tags,
end tags, and text, with no guarantee that the tags will actually
correspond in any meaningful way. lxml can be used to output an
actual hierarchical structure that may be easier to manipulate and
extract data from.

Cheers,
Ian
--
http://mail.python.org/mailman/listinfo/python-list

Subject User Time
What's the best way to write this regular expression? johnjsal at gmail Mar 6, 2012, 2:43 PM
    Re: What's the best way to write this regular expression? clp2 at rebertia Mar 6, 2012, 2:52 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 6, 2012, 3:02 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 6, 2012, 3:02 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 6, 2012, 3:05 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 6, 2012, 3:05 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 6, 2012, 3:25 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 6, 2012, 3:33 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 6, 2012, 3:33 PM
    Re: What's the best way to write this regular expression? ian.g.kelly at gmail Mar 6, 2012, 3:35 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 6, 2012, 3:39 PM
    Re: What's the best way to write this regular expression? steve+comp.lang.python at pearwood Mar 6, 2012, 3:44 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 6, 2012, 3:57 PM
    RE: What's the best way to write this regular expression? ramit.prasad at jpmorgan Mar 6, 2012, 4:04 PM
    Re: What's the best way to write this regular expression? tjreedy at udel Mar 6, 2012, 5:04 PM
    Re: What's the best way to write this regular expression? tjreedy at udel Mar 6, 2012, 5:06 PM
    Re: What's the best way to write this regular expression? roy at panix Mar 6, 2012, 5:26 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 6, 2012, 11:02 PM
    Re: What's the best way to write this regular expression? no.email at nospam Mar 7, 2012, 2:36 AM
        Re: RE: What's the best way to write this regular expression? driscoll at cs Mar 7, 2012, 2:02 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 7, 2012, 12:39 PM
    Re: What's the best way to write this regular expression? ian.g.kelly at gmail Mar 7, 2012, 1:01 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 7, 2012, 1:11 PM
    Re: What's the best way to write this regular expression? benjamin.kaplan at case Mar 7, 2012, 1:27 PM
    RE: What's the best way to write this regular expression? ramit.prasad at jpmorgan Mar 7, 2012, 1:31 PM
    Re: What's the best way to write this regular expression? ian.g.kelly at gmail Mar 7, 2012, 1:34 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 7, 2012, 1:44 PM
    Re: What's the best way to write this regular expression? rosuav at gmail Mar 7, 2012, 9:03 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 7, 2012, 11:25 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 7, 2012, 11:26 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 8, 2012, 1:33 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 8, 2012, 1:40 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 8, 2012, 1:52 PM
    Re: What's the best way to write this regular expression? gordon at panix Mar 8, 2012, 1:54 PM
    Re: What's the best way to write this regular expression? d at davea Mar 8, 2012, 2:19 PM
        Re: What's the best way to write this regular expression? johnjsal at gmail Mar 8, 2012, 2:25 PM
        Re: What's the best way to write this regular expression? ethan at stoneleaf Mar 8, 2012, 2:52 PM
    RE: What's the best way to write this regular expression? ramit.prasad at jpmorgan Mar 8, 2012, 3:02 PM
    Re: What's the best way to write this regular expression? d at davea Mar 8, 2012, 3:23 PM
    Re: What's the best way to write this regular expression? wuwei23 at gmail Mar 8, 2012, 7:38 PM
    Re: What's the best way to write this regular expression? johnjsal at gmail Mar 8, 2012, 7:52 PM
    Re: What's the best way to write this regular expression? jkn_gg at nicorp Mar 9, 2012, 2:45 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.