Re: [pcre-dev] [Bug 1315] \r, \n and $ matching seems to be …

Etusivu
Poista viesti
Lähettäjä: Zoltán Herczeg
Päiväys:  
Vastaanottaja: pcre exim
Aihe: Re: [pcre-dev] [Bug 1315] \r, \n and $ matching seems to be illogical or not fully documented.
Hi,

I just wanted to show an example with /something$[^x]something/m expression. I think it helps if we show how these assertions can be expanded. If newline type is anycrlf and multiline is set for example

$ is the same as (?=\Z|\r|\n)
^ is the same as (?<=\A|\r|\n)

This is how the JIT actually matches them.

Regards,
Zoltan