San*_*hal 0 java regex
我有一个字符串s"hello,sa n.txt"
但我希望字符串s ="hellosan.txt"没有逗号,没有空格,没有分号,应该在那里我怎么能在java中使用正则表达式?
Boh*_*ian 6
String input = "hello,sa n.txt"; String clean = input.replaceAll("[, ;]", ""); // replace any of ", ;" with "nothing"
归档时间:
14 年,2 月 前
查看次数:
18202 次
最近记录: