help for splitting a string in javascript
- by Hero
Hi everyone...
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 was correct.
But I need to use "split" method and save store the outputs in a array.
so I can't use the Match Method.
So please help me...