[pcre-dev] [Bug 1032] With MULTILINE option, cannot correct…

Inizio della pagina
Delete this message
Autore: Philip Hazel
Data:  
To: pcre-dev
Oggetto: [pcre-dev] [Bug 1032] With MULTILINE option, cannot correctly handle searching for $ over CRLF
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1032




--- Comment #3 from Philip Hazel <ph10@???> 2010-10-20 17:42:53 ---
On Wed, 20 Oct 2010, Richard Smith wrote:

> Many thanks for the speedy (immediate) response!


You were just lucky. I have been on holiday and away from email since
last Saturday until an hour or so ago.

> However, the pcretest program you have pointed me to appears to be a
> bit clever than that and shows me exactly what I need to do: it is
> looking within the block returned by pcre_compile to see what options
> are actually set, which presumably includes the effects of (*CR) etc.


Yes. However, you shouldn't do it the way pcretest does it (peering
inside the block directly). You should use the pcre_fullinfo() function
with the PCRE_INFO_OPTIONS flag, in order to extract the options that
were set with the regex. And yes, it should include the effects of (*CR)
etc. If none were set, as pcretest does, use pcre_config() to find the
default.

> With this info I have all I need to resolve the problem and do not require
> anything further from the engine; many thanks for your help!


I have made a note to include some of this information in the
documentation somewhere. I'll close the bug when I've done that.

Philip


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email