Hey there, I'm trying to replace a
<blockquote>...</blockquote>
with
>> ...
This is my Code:
var testhtml = 'sdkjhfbs <blockquote>skldfjsfkjghbs\n sdjkfhb ksdbhv isl\n kdjbhdfgkj bs</blockquote>kdjfgnkdfj';
alert(blockquoteConvert(testhtml));
function blockquoteConvert(html) {
return '>>' + html.
replace(/<blockquote>([^]+)<\/blockquote>/gi,"$1").
replace('/\n/','\n>> ');
}
But it doesn't find the Linebreaks. (I checked with indexOf('\n')).
How can I do this ?