Re: Regular Expression - old regex module vs. re module

2006-07-01 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Steve <[EMAIL PROTECTED]> wrote: >Hi All! > >Thanks for your suggestions and comments! I was able to use some of >your code and suggestions and have come up with this new version of >Report.py. > >Here's the updated code : > >exponentPattern = re.compile('\(^\|[^\\#

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Steve
Hi All! Thanks for your suggestions and comments! I was able to use some of your code and suggestions and have come up with this new version of Report.py. Here's the updated code : - #!/usr/bin/env python """Provides two classes

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Paul McGuire <[EMAIL PROTECTED]> wrote: >"Jim Segrave" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] > >I can see that the OP omitted the concept of "@|||" centering, since the >Python string interpolation forms only support right or left justified >fi

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Paul McGuire
"Jim Segrave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The poster was excluding escaped (with a '\' character, but I've just > looked up the Perl format statement and in fact fields always begin > with a '@', and yes having no digits on one side of the decimal point > is legal

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Paul McGuire <[EMAIL PROTECTED]> wrote: >"Jim Segrave" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> In article <[EMAIL PROTECTED]>, >> Paul McGuire <[EMAIL PROTECTED]> wrote: >> >> >Not an re solution, but pyparsing makes for an easy-to-follow prog

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Paul McGuire
"Jim Segrave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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. > Here's a little more stud

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Paul McGuire
"Jim Segrave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PROTECTED]>, > Paul McGuire <[EMAIL PROTECTED]> wrote: > > >Not an re solution, but pyparsing makes for an easy-to-follow program. > >TransformString only needs to scan through the string once - the > >"r

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Paul McGuire
"Jim Segrave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > 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. > True. What is the spec

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Paul McGuire <[EMAIL PROTECTED]> 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

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Paul McGuire
"Steve" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi All, > > I'm having a tough time converting the following regex.compile patterns > into the new re.compile format. There is also a differences in the > regsub.sub() vs. re.sub() > > Could anyone lend a hand? > > Not an re so

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Steve <[EMAIL PROTECTED]> wrote: >Hi All, > >I'm having a tough time converting the following regex.compile patterns >into the new re.compile format. There is also a differences in the >regsub.sub() vs. re.sub() > >Could anyone lend a hand? > > >import regsub >impor

Regular Expression - old regex module vs. re module

2006-06-29 Thread Steve
Hi All, I'm having a tough time converting the following regex.compile patterns into the new re.compile format. There is also a differences in the regsub.sub() vs. re.sub() Could anyone lend a hand? import regsub import regex import re# << need conversion to this module """Conv