I have a regular expression which removes html code from a String :
var html = "<p>Dear sms,</p><p>This is a test notification for push message from center II.</p>";
text = html.replace(/(<([^>]+)>)/ig, "")
alert(text)
This is the expression working on jsfiddle : http://jsfiddle.net/VgHr3/53/
The regular expression itself is /(<([^>]+)>)/ig . I don't fully understand how this expression works. Can provide an explanation ? I can find what each character by itself behaves by reading a cheatsheet :http://www.cheatography.com/davechild/cheat-sheets/regular-expressions/
But what is the significance of "/ig" ?
iis case-insensitive andgis global. Relevant.