I want to remove starting and trailing br and nbsp tags from a string using java or javascript.
Input and desired output are hosted in jsfiddle.net because Stackoverflow is not letting me to post html content.
http://jsfiddle.net/HwDf9/
Something like this?
request.replace(/^\ \;|<br?\>*/gi, "").replace(/\ \;|<br?\>$/gi, "").trim();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With