I am getting a string which is nothing but innerHTML, and so it has instances of . I need to trim the string such that the trailing alone are removed.
Tried this:
var text;
text = txtInnerHTML.replace(/( )*/g,"");
This removes all instances of which is not desired.. Only the trailing instances may be which may be zero or more need to be removed.