I want to split this string: 315-045/10-20 to this array: [“315″,”045″,”10″,”20”], meaning it should be split around every occurrence of ‘/’ or ‘-‘.
Is it possible to do it with one call to the split() function?
I want to split this string: 315-045/10-20 to this array: [315,045,10,20], meaning it should
Share
You can use a regex which accepts both slashes and dashes.