From kfm-devel Thu Oct 18 08:24:26 2001 From: David Faure Date: Thu, 18 Oct 2001 08:24:26 +0000 To: kfm-devel Subject: Re: Regular Expressions - PCRE wins, I think. X-MARC-Message: https://marc.info/?l=kfm-devel&m=100339359325119 On Jeudi 18 Octobre 2001 06:30, Michael Bedy wrote: > On Thu, 18 Oct 2001, Dirk Mueller wrote: > > > On Mit, 17 Okt 2001, Michael Bedy wrote: > > > > > It looks to me like QRegEx gets very close, but misses a few crucial > > > features. The biggest of these is lack of /m support and all the various > > > things that go along with it. Also, the "." atom always matches newlines > > > in QRegEx. This is equivelant to the /s option in Perl, but Javascript > > > unfortunatly requires that "." not match newlines. > > > > > > In addition, the /g option is not directly supported in QRegEx, however > > > it could be emulated with a little bit of work. > > > > As far as I know we don't support /g currently at all :-( (which breaks > > google directory btw, so it needs urgent fixing!). > > > > do you think it would be possible without many hacks to add an translation > > layer between javascript regexp and QRegexp? Although pcre is small, > > dropping an additional dependency is nice. > > IMHO, given the results of this investigation, we should simply go for full pcre use. We have that dependency already, so this won't change anything, we would simply make it mandatory, and we'd get full support for perl-like regexps in javascript, in a much easier way than trying to emulate things on top of an incomplete regexp implementation. Just my 2 cents. David.