Pattern pattern = Pattern.compile("\\b\\w+\\b"); Mathcher mather = pattern.mathcer(str); 转载于:https://www.cnblogs.com/akingseu/p/3485878.html