This one's got me stumped.
I'm trying to rip out incomplete HTML tags from the end of a
string... here's an example:
Here is a string with <a\nhref=http://somewhere.com/and/then
Note that there is a newline in there. So i try something simple, like:
~ str.sub(/<[^>]*?$/m, "")
but it doesn't do squat. Interestingly enough, i tried the
following in perl, which i think is the direct translation:
~ $str =~ s/<[^>]*?$//s
and it works just fine.
Anyone know how to get this to work in ruby?
Derek Wyatt - C++ / Ruby / Unix Programmer