71
rated 0 times
[
74]
[
3]
/ answers: 1 / hits: 71582
/ 14 Years ago, wed, december 22, 2010, 12:00:00
How can I split a string without removing the delimiters?
Let's say I have a string:
var string = abcdeabcde;
When I do
var newstring = string.split(d)
, I get something like this:
[abc,eabc,e]
But I want to get this:
[abc,d,eabc,d,e]
When I tried to do my split2 function, I got all entangled in splice() and indexes and this vs that and ... aargh! Help! :D
More From » split