I want to remove the start and trailing br and nbsp tags from a string using java or javascript.
The input and the desired output are hosted in jsfiddle.net because Stackoverflow does not allow me to host html content.
http://jsfiddle.net/HwDf9/
Something like that?
request.replace(/^\ \;|<br?\>*/gi, "").replace(/\ \;|<br?\>$/gi, "").trim();