* Hal Fulton (hal9000 / hypermetrics.com) [27 Aug 2003 07:22]:

[...]
> > what do ^ and $ mean then?  they do match start and end
> > for me.  what else do they match? *shudders at thought
> > of changing lots of code

> Correct me if I'm wrong. (Famous last words on most newsgroups.)

> Isn't it an issue only in multiline mode? In that case, I
> think ^ and $ would match the start and end of the line
> rather than the entire string.

In Perl's multiline mode (/m), yes.

Perl's multiline mode is on by default in Ruby. Thus this is
true in Ruby by default.

This means that ^ and $ match start and end of line _not_
string. Always.



Ruby's multiline mode (/m) is Perl's single line mode (/s).

^ and $ aren't affected by Ruby's multiline mode (/m).

It makes '.' match newline (rather than every char except
newline).




cheers,
-- 
Iain.