fork download
  1. text = "Hi <p class=\"hello\">\r\nthere, how are you\r\n</p>"
  2. puts text.gsub(/(<.*?>)|[[:blank:]]/m) { $1 || '_' }
Success #stdin #stdout 0.01s 6368KB
stdin
Standard input is empty
stdout
Hi_<p class="hello">
there,_how_are_you
</p>