117
rated 0 times
[
123]
[
6]
/ answers: 1 / hits: 32497
/ 7 Years ago, mon, february 13, 2017, 12:00:00
I have the following line of code to remove illegal characters from a file name:
str= str.replace(/([^a-z0-9]+)/gi, '-');
That works fine but it also removes the spaces, how can I only remove the illegal characters but leave the spaces?
More From » regex