com.github.shoothzj.javatool.util.RegexUtil Maven / Gradle / Ivy
package com.github.shoothzj.javatool.util;
import java.util.regex.Pattern;
/**
* 正则表达式常量类
*/
public class RegexUtil {
public static String wordsReg = "\\w+";
public static final String IPV4_REGEX = "\\A(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}\\z";
public static Pattern wordsPtn = Pattern.compile(wordsReg);
public static Pattern IPV4_PATTERN = Pattern.compile(IPV4_REGEX);
}