I'd asked a question about the splitting the a string like below:
Input string: a=>aa| b=>b||b | c=>cc
and the output:
a=>aa b=>b||b c=>cc
Kobi's answer was:
var matches = "a=>aa|b=>b||b|c=>cc".match(/(?:[^|]|\|\|)+/g)
His answer worked, but I need to use the .split()
method and store the outputs in an array.
So I can't use the .match()
Method.
How can I do it?