help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange regexp behavior


From: Thomas Weber
Subject: Re: strange regexp behavior
Date: Thu, 18 Sep 2008 11:30:04 +0200

Am Donnerstag, den 18.09.2008, 11:02 +0200 schrieb David Bateman:
> G.. wrote:
> > David Bateman wrote:
> >   
> >> Do you know what restrictions the dfa version implies?
> >>
> >>     
> >
> > No. I don't know much about regexp internals. The PCRE list seems the place
> > to go.
> >
> > G.
> >
> >   
> Ok reading the man page pcrematching it appears that there are several 
> restrictions that will impact the use of the DFA algorithm
> 
> * It can't tell the difference between a greedy and non-greedy match and 
> so this feature of Octave's regexp function can't be used.
> 
> * It can't keep back references and so lookbehind can't be implemented.
> 
> * Its slower...
> 
> I'd therefore suggest keeping the standard pcre_exec function in Octave, 
> and how the PCRE people fix this eventually for your test string in 
> future versions of PCRE.

I'm currently discussing this with PCRE developers on their list, 
http://lists.exim.org/lurker/message/20080915.202357.7f71f452.en.html

I already learned that this innocent looking pattern is a bad citizen :)

        Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]