MCPcopy Create free account
hub / github.com/Xiaoc7r/CityHub / RegexPatterns

Class RegexPatterns

src/main/java/com/hmdp/utils/RegexPatterns.java:6–24  ·  view source on GitHub ↗

@author 虎哥

Source from the content-addressed store, hash-verified

4 * @author 虎哥
5 */
6public abstract class RegexPatterns {
7 /**
8 * 手机号正则
9 */
10 public static final String PHONE_REGEX = "^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\\d{8}$";
11 /**
12 * 邮箱正则
13 */
14 public static final String EMAIL_REGEX = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$";
15 /**
16 * 密码正则。4~32位的字母、数字、下划线
17 */
18 public static final String PASSWORD_REGEX = "^\\w{4,32}$";
19 /**
20 * 验证码正则, 6位数字或字母
21 */
22 public static final String VERIFY_CODE_REGEX = "^[a-zA-Z\\d]{6}$";
23
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected