Re: [pcre-dev] /x modifier bug when using # comments in RE ?

Page principale
Supprimer ce message
Auteur: GAUTIER Herve
Date:  
À: pcre-dev@exim.org
Sujet: Re: [pcre-dev] /x modifier bug when using # comments in RE ?

On 06/06/2014 11:37, ph10@???<mailto:ph10@hermes.cam.ac.uk> wrote:

On Thu, 5 Jun 2014, GAUTIER Herve wrote:

> Additional information.
> The library 8.34 is compiled with following options:
> PCRE_CONFIGURE_OPTS =
> PCRE_CONFIGURE_OPTS += --prefix=$(PCRE_OBJROOT)
> PCRE_CONFIGURE_OPTS += --disable-shared
> PCRE_CONFIGURE_OPTS += --disable-cpp
> PCRE_CONFIGURE_OPTS += --enable-jit
> PCRE_CONFIGURE_OPTS += --enable-newline-is-crlf

                           ^^^^^^^^^^^^^^^^^^^^^^


This seems to be the problem. Did you actually have CRLF following "#
test" in your file?

In my opinion, no.
As I have used the pcretest program in a xterm on Linux, only a \n is added when I press the return key


On my Linux system your test behaves "oddly" as you demonstrate when
just NL is used as a line terminator, but if I ensure that there is a
CRLF present, there is no difference with and without "# test".


I am not sure to understand the case it works.
--enable-newline-is-lf and then in pcretest when re> input, add CRLF at each end of line ?

Anyway, in my configuration, what could lead to the different results when adding or not a comment in regex using # ???

Rv

--
Hervé GAUTIER