Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Regexps and HTML comments
Dan Diebolt
11/22/2007 7:37:00 PM
Note: parts of this message were removed by the gateway to make it a legal Usenet post.
Add an "m" for multiline after the missing closing delimiter "/" for the regexp
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-...
Jari Williamsson <jari.williamsson@mailbox.swipnet.se> 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
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Regexps and HTML comments
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password