I have a string similar to "<p></p>"
. Now, I want to split this string, so I have 2 tags. If I do
var arr = "<p></p>".split("><")
, I get an array that looks like
["<p", "/p>"]
Is there a simple way to keep the separator in this split? NOT a REGEX (Not a dupe) I want :
["<p>","</p>"]