Re: f*cking re module

2005-07-08 Thread George Sakkis
"Mike Meyer" <[EMAIL PROTECTED]> wrote: > I only know one compiler that punts after the first error. Even with > lots of cheap computing power, it's still very annoying. > > Come to think of it, Python does this, doesn't it? For some reason, > that doesn't annoy me. Maybe because I don't think of

Re: f*cking re module

2005-07-08 Thread Mike Meyer
Rocco Moretti <[EMAIL PROTECTED]> writes: > François Pinard wrote: > If your program had only minor errors, there was likely a good chance > that the compiler might guess correctly, and your program would > compile to what you wanted in the first place. If not, by continuing > on, the compiler can

Compiler error recovery [was: Re: f*cking re module]

2005-07-08 Thread François Pinard
[Rocco Moretti] > François Pinard wrote: > > I once worked with a PL/I compiler (on a big IBM mainframe), which was > > trying to be helpful by spitting pages of: > > Error SUCH AND SUCH, assuming that THIS AND THIS was meant. > > and continuing compilation nevertheless. It was a common jok

Re: f*cking re module

2005-07-08 Thread Kay Schluehr
jwaixs schrieb: > arg... I've lost 1.5 hours of my precious time to try letting re work > correcty. 1.5 hours are not enough for understanding regular expressions. But to be honest: I never had the patience to learn them accurately and I guess I will never do so as well as I don't ever learn sed o

Re: f*cking re module

2005-07-08 Thread Rocco Moretti
François Pinard wrote: > I once worked with a PL/I compiler (on a big IBM mainframe), which was > trying to be helpful by spitting pages of: > > Error SUCH AND SUCH, assuming that THIS AND THIS was meant. > > and continuing compilation nevertheless. It was a common joke to say > that PL/I w

Re: f*cking re module

2005-07-08 Thread François Pinard
[Mike Meyer] > Steven D'Aprano <[EMAIL PROTECTED]> writes: > > > Is there any possible sequence of bytes that will not be a valid > > Perl expression or operator? Perl has lots of syntax, and good warning facilities, it is not so bad. > [...] TECO, where guessing what your name did as a command

Re: f*cking re module

2005-07-08 Thread paron
That is so handy!! Thanks! Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: f*cking re module

2005-07-07 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Thu, 07 Jul 2005 06:47:54 -0400, Chris Smith wrote: >> Oh, come on: what's a Perliodic Table of Operators, between friends? >> http://www.ozonehouse.com/mark/blog/code/PeriodicTable.html > That, and the discussion on operators by Larry Wall, are two

Re: f*cking re module

2005-07-07 Thread Steven D'Aprano
On Thu, 07 Jul 2005 06:47:54 -0400, Chris Smith wrote: >> "Michael" == Michael Hoffman <[EMAIL PROTECTED]> writes: > > Michael> Greg Lindstrom wrote: > >> I hear that Perl 6 is going to have a rewrite of regular > >> expressions; it will be interesting to see what their hard work

Re: f*cking re module

2005-07-07 Thread Chris Smith
> "Michael" == Michael Hoffman <[EMAIL PROTECTED]> writes: Michael> Greg Lindstrom wrote: >> I hear that Perl 6 is going to have a rewrite of regular >> expressions; it will be interesting to see what their hard work >> produces. Michael> From what I saw a while ago, it d

Re: f*cking re module

2005-07-06 Thread Jorgen Grahn
On 5 Jul 2005 08:04:21 -0700, jwaixs <[EMAIL PROTECTED]> wrote: ... > The python re module is, in my opinion, a non beginner user friendly > module. And it's not meant for beginning python programmers. I don't > have any experience with perl or related script/programming languages > like python. (I

Re: f*cking re module

2005-07-06 Thread Simon Brunning
On 6 Jul 2005 01:01:34 -0700, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > With * being a greedy operator, your post's subject line matches, > "firetrucking" Nope: >>> print re.match('f*cking', 'firetrucking') None The OP was clearly showing his lack of regex nouce here. Clearly he wanted 'f.*

Re: f*cking re module

2005-07-06 Thread Raymond Hettinger
> There's really not a single good re tutorial or documentation >I could found! With * being a greedy operator, your post's subject line matches, "firetrucking" which, of course, has nothing to do with regular expressions, or python.org's re how-to guide, or Amazon's 18 books on the subject, or th

Re: f*cking re module

2005-07-05 Thread Terry Hancock
On Tuesday 05 July 2005 10:04 am, jwaixs wrote: > The python re module is, in my opinion, a non beginner user friendly > module. And it's not meant for beginning python programmers. I don't > have any experience with perl or related script/programming languages > like python. (I prefer to do things

Re: f*cking re module

2005-07-05 Thread Paul McGuire
Forgot to mention: Download pyparsing at http://pyparsing.sourceforge.net. -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: f*cking re module

2005-07-05 Thread Paul McGuire
Your elaboration on what problem you are actually trying to solve gave me some additional insights into your question. It looks like you are writing a Python-HTML templating system, by embedding Python within HTML using ... tags. As many may have already guessed, I worked up a pyparsing treatment

Re: f*cking re module

2005-07-05 Thread Gustavo Niemeyer
e news group. > I was frustration and should, probebly, not post this frustration. But > it was never my purpous to ask something stupid or asking it arrogant. You can post frustration for sure. But saying "f*cking re module" and than showing that your problem is not understanding the very

Re: f*cking re module

2005-07-05 Thread Don
jwaixs wrote: > To reply to the last part of the discussion and esspecially to Gustavo > Niemeyer, I really apriciate the way in which I had been answered. And > I won't have any questions about the re module that I had before I post > this threat. > > I was frustration and should, probebly, not

Re: f*cking re module

2005-07-05 Thread George Sakkis
"jwaixs" <[EMAIL PROTECTED]> wrote: > To reply to the last part of the discussion and esspecially to Gustavo > Niemeyer, I really apriciate the way in which I had been answered. And > I won't have any questions about the re module that I had before I post > this threat. > > I was frustration and s

Re: f*cking re module

2005-07-05 Thread jwaixs
To reply to the last part of the discussion and esspecially to Gustavo Niemeyer, I really apriciate the way in which I had been answered. And I won't have any questions about the re module that I had before I post this threat. I was frustration and should, probebly, not post this frustration. But

Re: f*cking re module

2005-07-05 Thread Michael Hoffman
Greg Lindstrom wrote: > I hear that Perl 6 is > going to have a rewrite of regular expressions; it will be interesting > to see what their hard work produces. From what I saw a while ago, it didn't look like it would be any simpler or more elegant. But that was a while ago. -- Michael Hoffman

Re: f*cking re module

2005-07-05 Thread Greg Lindstrom
> That's what I love in that news group. Someone comes with a > stupid and arrogant question, and someone else answers in a > calm and reasonable way. Me, too. Indeed, that's a great reason to be a part of this community. I didn't see the original question as either stupid or arrogant; I read it a

Re: f*cking re module

2005-07-05 Thread François Pinard
[D H] > Gustavo Niemeyer wrote: > > That's what I love in that news group. Someone comes with a > > stupid and arrogant question, and someone else answers in a > > calm and reasonable way. > ...and then someone else comes along and calls the first person stupid > and arrogant, which is deemed QOTW

Re: f*cking re module

2005-07-04 Thread D H
Gustavo Niemeyer wrote: > That's what I love in that news group. Someone comes with a > stupid and arrogant question, and someone else answers in a > calm and reasonable way. ...and then someone else comes along and calls the first person stupid and arrogant, which is deemed QOTW. :) -- http://m

Re: f*cking re module

2005-07-04 Thread Erik Max Francis
James Stroud wrote: > Its perhaps that they remember the frustration of being new to programming. > Those "wasted" 1.5 hr sessions getting nowhere add up pretty fast and then > the explicatives begin to flow. Also because the best way to make someone who's having a tantrum look foolish in publ

Re: f*cking re module

2005-07-04 Thread James Stroud
On Monday 04 July 2005 12:39 pm, Gustavo Niemeyer wrote: > > > the only thing I want are the number of places blabla, Re modules > > > sucks! and blabla are. > > > > Your question is still not clear. What you're searching for is > > '', which isn't there, so .search returns None, and so > > you ge

Re: f*cking re module

2005-07-04 Thread Gustavo Niemeyer
> > the only thing I want are the number of places blabla, Re modules > > sucks! and blabla are. > > Your question is still not clear. What you're searching for is > '', which isn't there, so .search returns None, and so > you get that exception (.group takes an argument, anyway). That's what

Re: f*cking re module

2005-07-04 Thread George Sakkis
"jwaixs" <[EMAIL PROTECTED]> wrote: > Thank you for your replies, it's much obvious now. I know more what I > can and can't do with the re module. But is it possible to search for > more than one string in the same line? > > bv. I want to replace the with " " > with "\n" and every thing that's n

Re: f*cking re module

2005-07-04 Thread Cyril BAZIN
If you are looking for HTML tags or something like that. Have a look at the HTMLParser (docs.python.org). On 4 Jul 2005 03:37:02 -0700, jwaixs <[EMAIL PROTECTED]> wrote: > Thank you for your replies, it's much obvious now. I know more what I > can and can't do with the re module. But is it possibl

Re: f*cking re module

2005-07-04 Thread jwaixs
Thank you for your replies, it's much obvious now. I know more what I can and can't do with the re module. But is it possible to search for more than one string in the same line? bv. I want to replace the with " " with "\n" and every thing that's not between the two python tags must begin with "

Re: f*cking re module

2005-07-04 Thread Stephen Harris
"jwaixs" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > arg... I've lost 1.5 hours of my precious time to try letting re work > correcty. There's really not a single good re tutorial or documentation > I could found! There are only reference, and if you don't know how a > module wo

Re: f*cking re module

2005-07-04 Thread Gurpreet Sachdeva
try: re.search("()(/python>)", str).group() except: print 'not found' otherwise, re.search("().*?(\/python>)", str).group() this is will help! Regards, Gurpreet Singh Blogging [at] http://garrythegambler.blogspot.com On 4 Jul 2005 01:04:47 -0700, jwaixs <[EMAIL PROTECTED]> wrote: > a

Re: f*cking re module

2005-07-04 Thread Diez B. Roggisch
jwaixs wrote: > arg... I've lost 1.5 hours of my precious time to try letting re work > correcty. There's really not a single good re tutorial or documentation > I could found! There are only reference, and if you don't know how a > module work you won't learn it from a reference! > > This is the

Re: f*cking re module

2005-07-04 Thread Max M
jwaixs wrote: > arg... I've lost 1.5 hours of my precious time to try letting re work > correcty. There's really not a single good re tutorial or documentation > I could found! There are only reference, and if you don't know how a > module work you won't learn it from a reference! If you want to t

Re: f*cking re module

2005-07-04 Thread Matthias Huening
jwaixs (04.07.2005 10:04): > arg... I've lost 1.5 hours of my precious time to try letting re work > correcty. There's really not a single good re tutorial or documentation > I could found! Did you try this one? http://www.amk.ca/python/howto/regex/regex.html import re str = "blablaRe mo

Re: f*cking re module

2005-07-04 Thread Erik Max Francis
jwaixs wrote: > arg... I've lost 1.5 hours of my precious time to try letting re work > correcty. There's really not a single good re tutorial or documentation > I could found! There are only reference, and if you don't know how a > module work you won't learn it from a reference! Then Google for

Re: f*cking re module

2005-07-04 Thread Simon Brunning
On 4 Jul 2005 01:04:47 -0700, jwaixs <[EMAIL PROTECTED]> wrote: > arg... I've lost 1.5 hours of my precious time to try letting re work > correcty. There's really not a single good re tutorial or documentation > I could found! http://www.amk.ca/python/howto/regex/ -- Cheers, Simon B, [EMAIL PROT

f*cking re module

2005-07-04 Thread jwaixs
arg... I've lost 1.5 hours of my precious time to try letting re work correcty. There's really not a single good re tutorial or documentation I could found! There are only reference, and if you don't know how a module work you won't learn it from a reference! This is the problem: >>> import re >>