https://gist.github.com/mcatta/6496191 var cleanText = strInputCode.replace(/<[\/]{0,1}(div)[^><]*>/g,"");