From: Dan Diebolt Date: 2007-11-23T04:37:17+09:00 Subject: Re: Regexps and HTML comments --0-1467808952-1195759840=:67353 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Add an "m" for multiline after the missing closing delimiter "/" for the regexp http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/11137 Jari Williamsson wrote: I have troubles with the regexp to get HTML comments ("-->") from a long (multi-line) string. Comments that have line breaks aren't found, only the comments that are on the same line. Here's my current code: result = s.match(/\) How do I get the regexp to scan for the pattern beyond newlines? Best regards, Jari Willimasson --0-1467808952-1195759840=:67353--