I have a string that I wish to split using multiple separators (including a string separator which I can't find much information on)
I wish to split the string on occurrences of / and the string AGL but that the moment when I print out the array array[0] I just get L. Quotes around the string AGL don't seem to make a difference.
str = "LLF ABC TEMP / HERE / RET / UP TP 12F AGL PLACENAME VALUES / AVM / ABC / PPP / END"
var array = [];
array = str.split(/(AGL|\/|)/g);
So at the end my array should have 9 items.
LLF ABC TEMP
HERE
RET
UP TP 12F
PLACENAME VALUES
AVM
ABC
PPP
END
Thank you.