
Set<String> stopWordsSet = SegmentWordsResult.getStopWordsSet();
for(String stop : stopWordsSet){
if(str.contains(stop))
// System.out.println("true: "+stop);
str = str.replaceAll(stop, "");
}
问题出现在加号附近,查询相关的资料显示,+、*、|、/等符号在正则表达示中有相应的不同意义。
一般来讲只需要加[]、或是//即可
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/13774.html