I like to replace any tag with specific string then print them on console.log
var str ='<p><img src=""><img src=""><img src=""><div><img src=""></div><div></div><img src=""><div></div></p>'
var result = $(str).find('img').replaceWith("<$1>")
I was expecting something like
var str ='<p><$1><$1><$1><div><$1></div><div></div><$1><div></div></p>'
Would be great after converting them i like to print the result