fork(1) download
  1. s = "> This is a blockquote line\ntesting a new line\n> 1- Another new blockquote section\n> 2- And this is part of the same blockquote\n> And this is the final line of this blockquote\ntesting another\n> 1- Another new blockquote\n> 2- And the final line of the 3rd blockquote"
  2. rx = /^>(.*)/
  3. puts s.gsub(rx, '<blockquote>\1</blockquote>')
  4.  
Success #stdin #stdout 0.01s 6284KB
stdin
Standard input is empty
stdout
<blockquote> This is a blockquote line</blockquote>
testing a new line
<blockquote> 1- Another new blockquote section</blockquote>
<blockquote> 2- And this is part of the same blockquote</blockquote>
<blockquote> And this is the final line of this blockquote</blockquote>
testing another
<blockquote> 1- Another new blockquote</blockquote>
<blockquote> 2- And the final line of the 3rd blockquote</blockquote>