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

Page principale
Supprimer ce message
Auteur: Zoltán Herczeg
Date:  
À: pcre exim
Sujet: 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