我有一个字符串,其中包含“这是时候介入$ FO,$ RTP,$ DFG和$ RG”
这也将工作
String str="This is a time to get involve into $FO, $RTP, $DFG and $RG" ;
String[] arr=str.split(" ");
for (String i:arr){
if(i.indexOf("$")==0){
System.out.println(i.replaceAll("\\,",""));
}
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句