Re: \z vs \Z vs $

[email protected] (Chaim Frenkel) 20 Sep 2000 13:51:25 -0400
Newsgroups perl.perl6.language.regex
Message-ID <[email protected]>
>>>>> "TC" == Tom Christiansen <[email protected]> writes:

>> Could you explain what the problem is?

TC> /$/ does not only match at the end of the string.
TC> It also matches one character fewer.  This makes
TC> code like $path =~ /etc$/ "wrong".

Sorry, I'm missing it.

	$_ = "etc\n";	/etc$/;		# true
	$_ = "etc";	/etc$/;		# true

In what way is this _wrong_?

Is it under /m? But then wouldn't longest match cover the situation?

And doesn't it only trigger at the end of a string? Within the string
it eats the "\n".

<chaim>
-- 
Chaim Frenkel					     Nonlinear Knowledge, Inc.
[email protected]				               +1-718-236-0183