help-octave
[Top][All Lists]
Advanced

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

Re: strange regexp behavior


From: David Bateman
Subject: Re: strange regexp behavior
Date: Thu, 18 Sep 2008 11:02:32 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080725)

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.

D.


--
David Bateman                                address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob) 91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax) The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary



reply via email to

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