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

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

Thread Previous
From:
Robin Barker
Date:
August 28, 2001 04:31
Subject:
Re: Bug or Feature: /\S$/ matches "\n"
Message ID:
200108281131.MAA16023@tempest.npl.co.uk

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

[snip]

> 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

-- 
Robin Barker                        | Email: Robin.Barker@npl.co.uk
CMSC, Building 10,                  | Phone: +44 (0) 20 8943 7090
National Physical Laboratory,       | Fax:   +44 (0) 20 8977 7091
Teddington, Middlesex, UK. TW11 OLW | WWW:   http://www.npl.co.uk

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About