[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: $ anchor for string of a whole file

Gavin Kistner

9/29/2006 4:03:00 PM

> And, shouldn't /m tell it to include everying, including newlines?

No, the multiline option causes the regexp engine to include newlines in
the '.' character class. Unlike some other languages, I don't believe it
has any effect on ^ or $.

1 Answer

Eero Saynatkari

9/29/2006 4:50:00 PM

0

On 2006.09.30 01:03, Gavin Kistner wrote:
> > And, shouldn't /m tell it to include everying, including newlines?
>
> No, the multiline option causes the regexp engine to include newlines in
> the '.' character class. Unlike some other languages, I don't believe it
> has any effect on ^ or $.

That is correct--^matches right after a newline and $ right before
it. \A and \Z are beginning and end of a given String, respectively.