Possible Duplicates:
How to remove Bullets from the text using javascript regular expression
How to identify and Remove any type of Bullet in the Text
I am copyig some data from the MS Word. That text may contain or May not contain Bullets in the copied text. But i need a Regular expression in javascript to remove any type of Bullets from the copied text.My code is given below.As of now it is removing only •.
var x = "1. Jnflkvkbfjvb 2. Kjnfbhvjbv 3. ;kbvrjvbrjvb • Jnflkvkbfjvb • Kjnfbhvjbv • ;kbvrjvbrjvb a) Jnflkvkbfjvb b) Kjnfbhvjbv c) ;kbvrjvbrjvb A. Jnflkvkbfjvb B. Kjnfbhvjbv C. ;kbvrjvbrjvb I. Jnflkvkbfjvb II. Kjnfbhvjbv III. ;kbvrjvbrjvb ";
x = x.replace(/[•\t.+]/g, '');
x = x.replace(/[[1-9]{?}+[.]\t]/g, '');
alert(x);
Please someone help me.
It’s basically a compound of various bullets you’d like to remove:
\d\.\s+– numbered bullets[a-z]\)\s+– small letter bullets with closing brace•\s+– usual bullet[A-Z]\.\s+– upper case bullets with dots[IVX]+\.\s+– Roman numbered bullets