Regular Expression - old regex module vs. re module

Jim Segrave jes at nl.demon.net
Fri Jun 30 11:58:02 EDT 2006


In article <ePapg.6149$Bh.3500 at tornado.texas.rr.com>,
Paul McGuire <ptmcg at austin.rr._bogus_.com> wrote:

>Not an re solution, but pyparsing makes for an easy-to-follow program.
>TransformString only needs to scan through the string once - the
>"reals-before-ints" testing is factored into the definition of the
>formatters variable.
>
>Pyparsing's project wiki is at http://pyparsing.wikispaces.com.

If fails for floats specified as ###. or .###, it outputs an integer
format and the decimal point separately. It also ignores \# which
should prevent the '#' from being included in a format.



-- 
Jim Segrave           (jes at jes-2.demon.nl)




More information about the Python-list mailing list