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
This solution finds both bulleted and numbered items at the beginning of the line of text, then removes them.
var x=" 1. 15-20 years ";
x.replace(/^\s*(?:[••••]|\d+)\.\t/, '');
alert(x); // i want out put as 15-20 years
I think you are trying to replace a substring, instead of replacing with a regular expression.