开发者

RegEx ignore in java

Hi i've got a String like "DE32424;WV424324;FR234324;DE45345"

How would I ignore everything after the first ; so only DE32424 would be left in t开发者_如何学Pythonhe string after using .replaceAll() in JAVA.


replaceAll(";.*", "");


yourString.substring(0, yourString.indexOf(';'))

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜