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

Kezdőlap
Üzenet törlése
Szerző: Ze'ev Atlas
Dátum:  
Címzett: pcre exim
Tárgy: Re: [pcre-dev] [Bug 1315] \r, \n and $ matching seems to be illogical or not fully documented.
 
Hi all
2 questions:
 
1. Is this constract:
/something$[^x]somethingelse/m
available in Perl as well?
 
2. Why should this constract match
something\nsomethingelse
I ask the question because \n does consume one position.  I understand that the $ itself does not consume any position, but in that case why do we need it, since
/something[^x]somethingelse/m
should hapily match
something\nsomethingelse
as well.
 
In essence, I guess that my question is what is the function of the $ assertion when not signaling the start of a string?

Ze'ev Atlas