0
Could someone help me, with some method, function or what is available, to make a string become an array made of pieces of the same example string:
var string = "stackoverflow";
var array = [];
console.log(array) // ['stack'], ['over'], ['flow']
and/or
var string = "gameoveragain";
var array = [];
console.log(array) // ['game'], ['over'], ['again']'
well that’s what I want as in the examples, something where I can reuse, and that always finds the 'over' chunk in the string and from there the string becomes a separate array, in this case it can be an array with 3 items 2, 1 or several, if in the case it is always found specifically 'over' inside the string.
Good
+1
! Can you explain how the split works in this case with eregx? So the answer becomes more complete.– Sergio
Thank you very much for the response and recommendations of study links, I really need to learn a lot of this, the algorithm is very simple, I just did not understand how the split works with regex, before asking the question here, I tried to do something using split, but no!
– Adry