我正在使用这两个正则表达式语句。我只想使用一个正则表达式规则来减少出现的所有类型空格的代码
strTestIn = strTestIn.replaceAll("[ ]+", " ");
strTestIn = strTestIn.replaceAll("(\\t)+", " ");
我需要使用什么正则表达式?
最佳答案
关于java - 使用单个正则表达式减少字符串代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16959722/