字符串正则校验

29 阅读1分钟

image.png

String regex= "\\d{4}/\\d{2}/\\d{2}好\\S";
s = 2022/04/06好二;
s.matches(regex) = true;