I am just trying to remove bullets from the text. For example when i am copying bulleted text list from MS Word to any textbox it is showing along with bullet. Can somebody tell
I think this fits your needs. http://jsfiddle.net/ksSG8/
var x=" 1. 15-20 years ";
x = x.replace(/\s\d\.\s*/, '');
alert(x);
One part that is missing from many answers and your code is:
x = x.replace(...);
x never receives the value returned from the replace() function if you do not assign it back to x.