I am trying to split some text into an array seperated by one or more
Here is some test code:
s = “one
it should split into [“one”,“two”,“three”,“four”] because the /
)+/ pattern should use one or more
as the pattern to split
but it does this
”, “two”, “
Why does it do this and what split could I use to get it to work?
Note:, I know that I could just fix it by removeing the
after it is done from the array, but it seems that the regular
expression in split should work.