develooper Front page | perl.perl5.porters | Postings from August 2001

Re: Bug or Feature: /\S$/ matches "\n"

Thread Previous
Robin Barker
August 28, 2001 04:31
Re: Bug or Feature: /\S$/ matches "\n"
Message ID:

> Sorry if this is an FAQ but I haven't found it in the perlre manpage.


> It seems, that $ matches the end of the string *except* when the last
> character is a newline, this seems to be ignored in that case. 

It is in perlre.pod (line 86):

         $   Match the end of the line (or before newline at the end)


Robin Barker                        | Email:
CMSC, Building 10,                  | Phone: +44 (0) 20 8943 7090
National Physical Laboratory,       | Fax:   +44 (0) 20 8977 7091
Teddington, Middlesex, UK. TW11 OLW | WWW:

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About