a simple unicode question

rurpy at yahoo.com rurpy at yahoo.com
Wed Oct 21 20:14:32 CEST 2009


On Oct 21, 4:59 am, Bruno Desthuilliers <bruno.
42.desthuilli... at websiteburo.invalid> wrote:
> beSTEfar a écrit :
> (snip)
>  > When parsing strings, use Regular Expressions.
>
> And now you have _two_ problems <g>
>
> For some simple parsing problems, Python's string methods are powerful
> enough to make REs overkill. And for any complex enough parsing (any
> recursive construct for example - think XML, HTML, any programming
> language etc), REs are just NOT enough by themselves - you need a full
> blown parser.

But keep in mind that many XML, HTML, etc parsing problems
are restricted to a subset where you know the nesting depth
is limited (often to 0 or 1), and for that large set of
problems, RE's *are* enough.



More information about the Python-list mailing list