[Tutor] Regular Expression guru saught

Rodrigues op73418@mail.telepac.pt
Tue Aug 5 08:48:02 EDT 2003


> -----Original Message-----
> From: tutor-admin@python.org
> [mailto:tutor-admin@python.org]On Behalf Of
> Kirk Bailey
> Sent: terca-feira, 5 de Agosto de 2003 2:26
> To: tutor@python.org
> Subject: Re: [Tutor] Regular Expression guru saught
>
>
> Well, as an example, here's the code of the moment:
> 	http;//www.tinylist.org/wikinehesa.txt
> and here is the mostly working reader tself:
> 	http://www.tinylist.org/cgi-bin/wikinehesa.py
> Works, reads, even  manages a somewhat crufty parsing into
> paragraphs,
> but need to handle the <b></b> and <i></i> matter.
>


Re's can't, I repeat, can't parse text with structure, you need a full
parser (state machine) for it. They can be used however to tokenize
the text, e.g. recognize the tags

< some-text-here-excluding-<-and->->

And then feed these tokens into the parser.

D. Mertz has a book online about text processing that might suit you
just fine.

With my best regards,
G. Rodrigues





More information about the Tutor mailing list