Windows regexp problem

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows regexp problem

Richard Crozier
I have a user on windows using the 4.0.0 release who is getting an error
like this:

error: regexp: PCRE does not support \L, \l, \N{name}, \U, or \u at
position 4 of expression

The offending regexp is something like:

^C:\Users\ <SNIP> \tb-xfemm_v1_6\mfemm\\.\.\cfemm\libfemm\liblua\lapi\.o$

I've redacted some to protect their privacy, but could provide it off
list if needed. The missing bit is just the rest of the file path.

The error occurs in a file mmake.m (which is an mfile implementation of
a subset of gnu make functionality). If interested you can find it here:

https://github.com/mbauman/mmake

I get no such error on Linux, so I'm wondering if this is a bug, or
known limitation of the underlying regex library on windows, googling
leads me to this:

http://stackoverflow.com/questions/3538293/php-regular-expression-pcre-does-not-support-l-l-n-p

Thanks,

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


Reply | Threaded
Open this post in threaded view
|

Re: Windows regexp problem

Richard Crozier


On 02/03/16 11:01, Richard Crozier wrote:

> I have a user on windows using the 4.0.0 release who is getting an error
> like this:
>
> error: regexp: PCRE does not support \L, \l, \N{name}, \U, or \u at
> position 4 of expression
>
> The offending regexp is something like:
>
> ^C:\Users\ <SNIP> \tb-xfemm_v1_6\mfemm\\.\.\cfemm\libfemm\liblua\lapi\.o$
>
> I've redacted some to protect their privacy, but could provide it off
> list if needed. The missing bit is just the rest of the file path.
>
> The error occurs in a file mmake.m (which is an mfile implementation of
> a subset of gnu make functionality). If interested you can find it here:
>
> https://github.com/mbauman/mmake
>
> I get no such error on Linux, so I'm wondering if this is a bug, or
> known limitation of the underlying regex library on windows, googling
> leads me to this:
>
> http://stackoverflow.com/questions/3538293/php-regular-expression-pcre-does-not-support-l-l-n-p
>
>
> Thanks,
>
> Richard
>

Actually, after just rereading my own message, this is clearly an issue
with my own code, sorry for the noise.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


Reply | Threaded
Open this post in threaded view
|

RE: Windows regexp problem

John Donoghue-3
In reply to this post by Richard Crozier
> Message: 1
> Date: Wed, 2 Mar 2016 11:01:32 +0000
> From: Richard Crozier <[hidden email]>
> To: Octave Maintainers <[hidden email]>
> Subject: Windows regexp problem
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> I have a user on windows using the 4.0.0 release who is getting an error
like this:
>
> error: regexp: PCRE does not support \L, \l, \N{name}, \U, or \u at
position 4 of
> expression
>
> The offending regexp is something like:
>
> ^C:\Users\ <SNIP> \tb-
> xfemm_v1_6\mfemm\\.\.\cfemm\libfemm\liblua\lapi\.o$
>
> I've redacted some to protect their privacy, but could provide it off list
if
> needed. The missing bit is just the rest of the file path.
>
> The error occurs in a file mmake.m (which is an mfile implementation of a
subset
> of gnu make functionality). If interested you can find it here:
>
> https://github.com/mbauman/mmake
>
> I get no such error on Linux, so I'm wondering if this is a bug, or known
> limitation of the underlying regex library on windows, googling leads me
to this:
>
> http://stackoverflow.com/questions/3538293/php-regular-expression-pcre-
> does-not-support-l-l-n-p
>
> Thanks,
>
> Richard
>

I think I had a similar issue a few days ago - the file name parts with
single '\' in the expressions need be changed to \\


Reply | Threaded
Open this post in threaded view
|

Re: Windows regexp problem

Richard Crozier
On 02/03/16 17:27, JohnD wrote:

>> Message: 1
>> Date: Wed, 2 Mar 2016 11:01:32 +0000
>> From: Richard Crozier <[hidden email]>
>> To: Octave Maintainers <[hidden email]>
>> Subject: Windows regexp problem
>> Message-ID: <[hidden email]>
>> Content-Type: text/plain; charset=utf-8; format=flowed
>>
>> I have a user on windows using the 4.0.0 release who is getting an error
> like this:
>>
>> error: regexp: PCRE does not support \L, \l, \N{name}, \U, or \u at
> position 4 of
>> expression
>>
>> The offending regexp is something like:
>>
>> ^C:\Users\ <SNIP> \tb-
>> xfemm_v1_6\mfemm\\.\.\cfemm\libfemm\liblua\lapi\.o$
>>
>> I've redacted some to protect their privacy, but could provide it off list
> if
>> needed. The missing bit is just the rest of the file path.
>>
>> The error occurs in a file mmake.m (which is an mfile implementation of a
> subset
>> of gnu make functionality). If interested you can find it here:
>>
>> https://github.com/mbauman/mmake
>>
>> I get no such error on Linux, so I'm wondering if this is a bug, or known
>> limitation of the underlying regex library on windows, googling leads me
> to this:
>>
>> http://stackoverflow.com/questions/3538293/php-regular-expression-pcre-
>> does-not-support-l-l-n-p
>>
>> Thanks,
>>
>> Richard
>>
>
> I think I had a similar issue a few days ago - the file name parts with
> single '\' in the expressions need be changed to \\
>
>

Thanks, in my case I solved it by just using forward slashes for all
file paths on both windows and linux, but I'll bear this in mind.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.