JAVA中的正则表达式用于连续3个或更多辅音检查

时间:2017-10-17 08:18:56

标签: java regex spring-boot swagger-ui

public static final String REGEX_NAME = "[^aeiouAEIOU]{3,}";
public static String str = "abbbc";
if(str.matches(REGEX_NAME))
System.out.println("matched");

这在任何正则表达式编辑器中都匹配,但在我的spring boot swagger中匹配。但它匹配字符串" bbbc" 。我的意思是它可以匹配整个单词但不能匹配部分单词。怎么解决这个问题。

0 个答案:

没有答案