From: "Hal E. Fulton" Date: 2003-04-17T06:43:55+09:00 Subject: Re: [Q] Reg. Expressios with "\n" ----- Original Message ----- From: "Daniel Carrera" To: "ruby-talk ML" Sent: Wednesday, April 16, 2003 4:36 PM Subject: [Q] Reg. Expressios with "\n" > >> str = "hello something \n world" > => "hello something \n world" > >> str =~ /(.*<\/html>)/ > => nil > > I want an RE that matches this string, but '.' doesn't match the \n > character. I guess I could replace the \n's by something else, but I'd > rather not alter the original string if I can avoid it. IIRC you can use the multiline modifier "m" on the RE. I haven't tried this: str =~ /(.*<\/html>)/m HTH, Hal