Hi,

I am trying to replace all html tags and spaces with "*" in a string.

I tried this code:

"as <b> sd</b>  <b>  ".sub(/<[\s\S]*?>| /,"*")

It just replaces the 1st occurance.

This code also doen't work:

"as <b> sd</b>  <b>  ".sub(/<[\s\S]*?>| /){|s| "*"}

How can I do that?

Thanks,
Alan

-- 
Posted via http://www.ruby-forum.com/.