UPDATE: actually if I want to match "-" I have to use - when there is something after -
All:
Why in this example:
var a = "Pencil_sharper.pdf"
a.split(/[. -_]+/g)
(4) ["", "encil", "sharper", "pdf"]
I expected
["Pencil", "sharper", "pdf"]
UPDATE: actually if I want to match "-" I have to use - when there is something after -
All:
Why in this example:
var a = "Pencil_sharper.pdf"
a.split(/[. -_]+/g)
(4) ["", "encil", "sharper", "pdf"]
I expected
["Pencil", "sharper", "pdf"]