I have the following string:
<stx>1<rs>aaaa<rs>bbbb<rs>cccc<etx>
How can i split it in a way that I get 1,aaaa,bbbb,cccc in an array?
I tried splitting on <rs> but then I get <stx>1,aaaa,bbbb,cccc in my array.
So how do I get rid of that <stx>?
stx,rs and etx are chars btw.
thx
You can split with the following regex:
When using it in Java, don’t forget to escape the
\: