From: 7stud -- Date: 2007-10-27T08:23:59+09:00 Subject: Re: Newlines included in bracket negation Jes炭s Gabriel y Gal叩n wrote: > On 10/27/07, Phrogz wrote: >> > => ["h", "", "day"] >> h.+day/, which does not match. > I need more sleep, for sure. I was of course thinking on the first "h" > and the last "day". That explains it :-) > A clue was in the capture results: rb(main):036:0> re = /(h)(.*)(day)/ => /(h)(.*)(day)/ irb(main):037:0> "happy\n\nbirthday".match(re).captures => ["h", "", "day"] The fact that the (.*) matched nothing was an indication that something was amiss. -- Posted via http://www.ruby-forum.com/.