----- Original Message ----- 
From: "Daniel Carrera" <dcarrera / math.umd.edu>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Wednesday, April 16, 2003 4:36 PM
Subject: [Q] Reg. Expressios with "\n"


> >> str = "hello <html> something \n</html> world"
> => "hello <html> something \n</html> world"
> >> str =~ /(<html>.*<\/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>.*<\/html>)/m

HTH,
Hal