I have this:
str = \"some html code [img]......[/img] some html code [img]......[/img]\"
and I want to get this:
[\"[img]..
str = "some html code [img]......[/img] some html code [img]......[/img]" p str.split("[/img]").each{|x|x.sub!(/.*\[img\]/,"")}