strange regexp behavior

David Bateman David.Bateman at motorola.com
Thu Sep 18 04:02:32 CDT 2008


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                                David.Bateman at motorola.com
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



More information about the Help-octave mailing list