My question is the same as Split string including regular expression match but for Scala. Unfortunately, the JavaScript solution doesn't work in Scala.
I am parsing some text. Let's say I have some string:
"hello wold <1> this is some random text <3> foo <12>"
I would like to get the following Seq: "hello world" :: "<1>" :: "this is some random text" :: "<3>" :: "foo" :: "<12>"
.
Note that I am spliting the string whenever I encounter a <"number"> sequence.