need help of regular expression genius

2008-05-05 Thread RJ vd Oest
-- http://mail.python.org/mailman/listinfo/python-list

Re: need help of regular expression genius

2006-08-03 Thread GHUM
Paul, > Pyparsing ships with JPG and PNG files containing class diagrams, plus an > htmldoc directory containing epydoc-generated help files. > There are also about 20 example programs included (also accessible in the > wiki). Yes. That's what I have been missing. Maybe you could add: "please als

Re: need help of regular expression genius

2006-08-03 Thread Paul McGuire
"GHUM" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Paul, > > > text = """ ... input source text ... "" > > from pyparsing import SkipTo,Literal,replaceWith > > ign1 = "$$" + SkipTo("$$") + "$$" > > ign2 = "$_$" + SkipTo("$_$") + "$_$" > > semi = Literal(";").setParseAction( replac

Re: need help of regular expression genius

2006-08-03 Thread GHUM
Paul, > text = """ ... input source text ... "" > from pyparsing import SkipTo,Literal,replaceWith > ign1 = "$$" + SkipTo("$$") + "$$" > ign2 = "$_$" + SkipTo("$_$") + "$_$" > semi = Literal(";").setParseAction( replaceWith("; <***>") ) > print (ign1 | ign2 | semi).transformString(text) Thank you

Re: need help of regular expression genius

2006-08-02 Thread Paul McGuire
"GHUM" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I need to split a text at every ; (Semikolon), but not at semikolons > which are "escaped" within a pair of $$ or $_$ signs. > The pyparsing rendition to this looks very similar to the SE solution, except for the regexp's: text

Re: need help of regular expression genius

2006-08-02 Thread Anthra Norell
u can add as many expressions as you want. You'd probably want to choose a more convenient split mark. Frederic - Original Message - From: "GHUM" <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Wednesday, August 02, 2006 5:27 PM Subject: need help of regular express

Re: need help of regular expression genius

2006-08-02 Thread Ant
GHUM wrote: > I need to split a text at every ; (Semikolon), but not at semikolons > which are "escaped" within a pair of $$ or $_$ signs. Looking at you example SQL code, it probably isn't possible with regexes. Consider the code: $$ blah blah ... $$ blah; xxx $$ blah blah $$ Regexes aren't c

need help of regular expression genius

2006-08-02 Thread GHUM
I need to split a text at every ; (Semikolon), but not at semikolons which are "escaped" within a pair of $$ or $_$ signs. My guess was that something along this should happen withing csv.py; but ... it is done within _csv.c :( Example: the SQL text should be splitted at "" (of course, those "spl