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

Góra strony
Delete this message
Autor: Zoltán Herczeg
Data:  
Dla: pcre exim
Temat: 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