Re: Compare regular expressions

2007-04-19 Thread Charles Sanders
Thomas Dybdahl Ahle wrote: > Hi, I'm writing a program with a large data stream to which modules can > connect using regular expressions. > > Now I'd like to not have to test all expressions every time I get a line, > as most of the time, one of them having a match means none of the others > ca

Re: Compare regular expressions

2007-04-17 Thread Thomas Dybdahl Ahle
Den Tue, 17 Apr 2007 11:59:15 -0700 skrev Paddy: > On Apr 17, 9:17 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> Paddy schrieb: >> > you could OR all the individual RE's test them all at once then find >> > out which matched. >> >> > big_re = "|".join( r"(?P<__match_%i__>%s)" % (i, r) >> >

Re: Compare regular expressions

2007-04-17 Thread Paddy
On Apr 17, 9:17 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Paddy schrieb: > > > > > On Apr 16, 10:50 am, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote: > >> Hi, I'm writing a program with a large data stream to which modules can > >> connect using regular expressions. > > >> Now I'd like t

Re: Compare regular expressions

2007-04-17 Thread Thomas Dybdahl Ahle
Den Mon, 16 Apr 2007 11:50:40 +0200 skrev Thomas Dybdahl Ahle: > Hi, I'm writing a program with a large data stream to which modules can > connect using regular expressions. > > Now I'd like to not have to test all expressions every time I get a > line, as most of the time, one of them having a m

Re: Compare regular expressions

2007-04-17 Thread Diez B. Roggisch
Paddy schrieb: > On Apr 16, 10:50 am, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote: >> Hi, I'm writing a program with a large data stream to which modules can >> connect using regular expressions. >> >> Now I'd like to not have to test all expressions every time I get a line, >> as most of the tim

Re: Compare regular expressions

2007-04-17 Thread Diez B. Roggisch
Adam Atlas schrieb: > On Apr 16, 1:50 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> It's not. For the simplest of expressions one might come up with a >> relation between them, but even that would be hard. General case? No chance. > > I wouldn't say there's 'no chance'. It would require ext

Re: Compare regular expressions

2007-04-16 Thread Adam Atlas
On Apr 16, 1:50 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > It's not. For the simplest of expressions one might come up with a > relation between them, but even that would be hard. General case? No chance. I wouldn't say there's 'no chance'. It would require external parsing, for sure, but

Re: Compare regular expressions

2007-04-16 Thread Paddy
On Apr 16, 10:50 am, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote: > Hi, I'm writing a program with a large data stream to which modules can > connect using regular expressions. > > Now I'd like to not have to test all expressions every time I get a line, > as most of the time, one of them having

Re: Compare regular expressions

2007-04-16 Thread Karthik Gurusamy
On Apr 16, 2:50 am, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote: > Hi, I'm writing a program with a large data stream to which modules can > connect using regular expressions. > > Now I'd like to not have to test all expressions every time I get a line, > as most of the time, one of them having a

Re: Compare regular expressions

2007-04-16 Thread Diez B. Roggisch
Thomas Dybdahl Ahle schrieb: > Hi, I'm writing a program with a large data stream to which modules can > connect using regular expressions. > > Now I'd like to not have to test all expressions every time I get a line, > as most of the time, one of them having a match means none of the others >

Compare regular expressions

2007-04-16 Thread Thomas Dybdahl Ahle
Hi, I'm writing a program with a large data stream to which modules can connect using regular expressions. Now I'd like to not have to test all expressions every time I get a line, as most of the time, one of them having a match means none of the others can have so. But ofcource there are also