strange regexp behavior
David Bateman
David.Bateman at motorola.com
Thu Sep 18 03:34:15 CDT 2008
G.. wrote:
> Thomas Weber-8 wrote:
>
>> The error code returned by PCRE is PCRE_ERROR_MATCHLIMIT.
>>
>> The problem happens also with the pcretest program:
>>
>> =======================================================================
>> $ pcretest
>> PCRE version 7.6 2008-01-28
>>
>> re> '(\s*-*\d+[.]*\d*\s*)+\n'
>> data>
>> '\t4\n0000\t-0.00\t-0.0000\t4\t-0.00\t-0.0000\t4\n0000\t-0.00\t-0.0000\t0\t-0.00\t-'
>> Error -8
>> =======================================================================
>>
>>
>
> Just for completeness: Philip Hazel (PCRE) suggested to replace, at least in
> this particular case, the function pcre_exec with pcre_dfa_exec, which in
> fact makes the problem disappear.
>
> G.
>
>
Is this a real solution? The pcre_dfa_exec function is a non perl
compatible regexp function, and so I assume it imposes additional
restrictions that will need to be understood and see if they are
compatible with the needs of the Octave regexp function and Matlab
compatibility. Do you know what restrictions the dfa version implies?
Regards
David
--
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