From: "Mark J. Reed" Date: 2003-12-10T02:12:03+09:00 Subject: Re: Multiline Regexps On Wed, Dec 10, 2003 at 01:56:43AM +0900, Ceri Storey wrote: > Either this is a bug, or I'm missing something: > > irb(main):001:0> /^[aeiou]/.match("foo\noooh") > => # > irb(main):002:0> /^[aeiou]/m.match("foo\noooh") > => # > > Shouldn't the second one return nil? I believe that Ruby's version of /m just makes . match \n (which it normally doesn't); the ^ and $ always match around \n. If you want to match the beginning or end of the entire string use \A instead of ^ and \Z instead of $. -Mark