package com.fs.common.utils;

import java.util.regex.Pattern;

public class PatternUtils {

    private final static Pattern PWD = Pattern.compile("^(?=.*[A-Za-z])(?=.*\\d)(?=.*[^A-Za-z0-9]).{8,20}$");

    /**
     * 校验密码是否符合条件
     * @param value 密码
     * @return boolean
     */
    public static boolean checkPassword(String value) {
        return PWD.matcher(value).matches();
    }
}
