Re: [pcre-dev] [Bug 603] New: Inconsistent results of \S vs …

Pàgina inicial
Delete this message
Autor: Philip Hazel
Data:  
A: 603
CC: pcre-dev
Assumpte: Re: [pcre-dev] [Bug 603] New: Inconsistent results of \S vs [\S] in unicode mode
On Sat, 22 Sep 2007, Alexey Proskuryakov wrote:

> re> /\S/8g
> data> ÿÿÿÿÿÿÿÿ
> 0: \x{442}
> 0: \x{435}
> 0: \x{441}
> 0: \x{442}
> data>
> re> /[\S]/8g
> data> ÿÿÿÿÿÿÿÿ
> No match
>
> The same problem exists for \W and \D.


I can see how this happens. You will probably find that [^\s] behaves
better. I think I know how to fix the problem in principle, but I have
not looked at the code. Unfortunately, 7.4 was released just last week
and there won't be a new release for a while. However, I will make sure
I do look at this when I next work on PCRE.

Philip

--
Philip Hazel, University of Cambridge Computing Service.