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 $.
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 $.
On 2006.09.30 01:03, Gavin K. 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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs