Philip Hazel schrieb:
> On Wed, 15 Oct 2008, Christian Ehrlicher wrote:
>
>> PCRE version 7.8 2008-09-05
>>
>> re> /\D/
>> ------------------------------------------------------------------
>> 0 5 Bra
>> 3 D
>> 5 5 Ket
>> 8 End
>> ------------------------------------------------------------------
>
> OK, that's definitely wrong. It has somehow lost the \ but why?? It
> should show this:
>
> ------------------------------------------------------------------
> 0 4 Bra
> 3 \D
> 4 4 Ket
> 7 End
> ------------------------------------------------------------------
>
>> I somehow miss the '\' ...
>
> Indeed.
>
>> I do not use readline. It's compiled with msvc8 and plain mingw (no msys
>> anywhere)
>
> OK, just for fun, why not try /\\D/ just to see what it says. (I am of
> course, just guessing here.) Another thing to try might be to put /\D/
> into a file and run "pcretest -d <filename>" to see if it is different
> when reading from a file.
>
pcre_compile() gets \D (two chars). Reading from file doesn't help either.
Here the test with \\D
PCRE version 7.8 2008-09-05
re> /\\D/
------------------------------------------------------------------
0 7 Bra
3 \D
7 7 Ket
10 End
------------------------------------------------------------------
Capturing subpattern count = 0
No options
First char = '\'
Need char = 'D'
data> 1.2
No match
data>
Christian