You can use regular expressions to split a string in JavaScript:
js
var s = "a111b22c599";
s.split(/([a-z])/); => ["", "a", "111", "b", "22", "c", "599"]
Note that the first element of the returning array is an empty string.
7 October 2014
You can use regular expressions to split a string in JavaScript:
var s = "a111b22c599";
s.split(/([a-z])/); => ["", "a", "111", "b", "22", "c", "599"]
Note that the first element of the returning array is an empty string.