Re: Newbie regular expression and whitespace question

2005-09-22 Thread Paul McGuire
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > timeit -s "import test" "test.test3()" > 100 loops, best of 3: 6.73 msec per loop > > > timeit -s "import test" "test.test4()" > 1 loops, best of 3: 27.8 usec per loop > > that's a 240x slowdown. hmm. > > > > W

Re: Newbie regular expression and whitespace question

2005-09-22 Thread googleboy
Thanks for the great positive responses. I was close with what I was trying, I guess, but close only counts in horseshoes and um.. something else that close counts in. :-) googleboy -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie regular expression and whitespace question

2005-09-22 Thread George Sakkis
"googleboy" <[EMAIL PROTECTED]> wrote: > Hi. > > I am trying to collapse an html table into a single line. Basically, > anytime I see ">" & "<" with nothing but whitespace between them, I'd > like to remove all the whitespace, including newlines. I've read the > how-to and I have tried a bunch of

Re: Newbie regular expression and whitespace question

2005-09-22 Thread Fredrik Lundh
Paul McGuire wrote: > If you're absolutely stuck on using RE's, then others will have to step > forward. Meanwhile, here's a pyparsing solution (get pyparsing at > http://pyparsing.sourceforge.net): so, let's see. using ... from pyparsing import * import re data = """ ... table example from o

Re: Newbie regular expression and whitespace question

2005-09-22 Thread Paul McGuire
"googleboy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi. > > I am trying to collapse an html table into a single line. Basically, > anytime I see ">" & "<" with nothing but whitespace between them, I'd > like to remove all the whitespace, including newlines. I've read the > h

Re: Newbie regular expression and whitespace question

2005-09-22 Thread Bruno Desthuilliers
googleboy a écrit : > Hi. > > I am trying to collapse an html table into a single line. Basically, > anytime I see ">" & "<" with nothing but whitespace between them, I'd > like to remove all the whitespace, including newlines. I've read the > how-to and I have tried a bunch of things, but noth

Newbie regular expression and whitespace question

2005-09-22 Thread googleboy
Hi. I am trying to collapse an html table into a single line. Basically, anytime I see ">" & "<" with nothing but whitespace between them, I'd like to remove all the whitespace, including newlines. I've read the how-to and I have tried a bunch of things, but nothing seems to work for me: -- t