[英]Java splitting a string on char
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? 我如何以一种在数组中获得1,aaaa,bbbb,cccc的方式拆分它?
I tried splitting on <rs>
but then I get <stx>1,aaaa,bbbb,cccc
in my array. 我尝试在
<rs>
上拆分,但随后在数组中得到<stx>1,aaaa,bbbb,cccc
。
So how do I get rid of that <stx>
? 那么如何摆脱
<stx>
呢?
stx
, rs
and etx
are chars btw. stx
, rs
和etx
是字符。
thx 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.