javascript - After removing bullet points using regex getting extra space between characters -


i using regular expression remove set of things bullet points text , able remove using following code:

 mystr = mystr.replace(/[^a-za-z 0-9 \.,\?""!@#\$%\^&\*\(\)-_=\+;:<>\/\\\|\}\{\[\]`~]*/g, ' '); 

but unfortunately when giving text example "abc def" getting space between characters.

what getting out put like: "a b c d e f".

please guide me correct in such way wont affect logic removing bullet point , othe stuffs

you replacing on "empty character", * means @ end when there 0 occurrences.

try replace +, means "one or more"


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -