Re: [pcre-dev] [Bug 897] \w and others based on Unicode prop…

Kezdőlap
Üzenet törlése
Szerző: Philip Hazel
Dátum:  
Címzett: 897
CC: pcre-dev
Tárgy: Re: [pcre-dev] [Bug 897] \w and others based on Unicode properties
On Fri, 19 Mar 2010, Pavel Kostromitinov wrote:

> Is there any hope that patches for this feature will make their way into main
> pcre version? I guess there'll be more people who could appreciate this.


Somebody was working on patches a few months ago, but I have heard no
more. The patches were rather large.

I am aware that this is an issue and I will think about it at some
point, but please do not hold your breath. It will not be soon.

> [^\pL\pN] can not be used, since the set is either inclusive or exclusive - and
> if I have [\Wa-f] as input, I cannot convert it ti something
> like[(^\pL\pN)a-f]...


Sadly, no. It would have to become (?:[^\pL\pN]|[a-f]) and I agree this
is not very nice. But it may be the best way to do it ... one of my
thoughts about how to provide this feature automatically is to do
conversions like that internally at compile time rather than having lots
of changes in the exec-time code.

> And there are problem with pcre_study.c.


What problems?

> Also - there should be some hack for \t to be treated as \s (it is NOT \pZ)


Do you mean that you do want it to match \pZ? Or you do want \t to still
match \s when \w, \d, etc are using Unicode properties?

Philip

--
Philip Hazel