package com.njcn.advance.utils;

import cn.hutool.core.codec.Base64;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.web.constant.ValidMessage;

import java.util.regex.Pattern;

/**
 * Description:
 * Date: 2024/12/10  14:51【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
public  class CheckStringUtil {
    public static void checkName(String name) {
        Pattern pattern = Pattern.compile(PatternRegex.SPECIALCHARACTER);
        if(pattern.matcher(name).find()){
            throw new BusinessException(ValidMessage.NAME_SPECIAL_REGEX);
        }
    }

//    public static void main(String[] args) {
//        checkName("100迈岭站2djvjva13ad");
//    }

}
