package com.sf.common.utils;

import lombok.experimental.UtilityClass;

import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

/**
 * 功能描述: 正则工具类
 *
 * @author a_kun
 * @date 2024/4/23 14:04
 */
@UtilityClass
public class RegexUtils {

    public static boolean isRegex(String input) {
        try {
            Pattern.compile(input);
            return true;
        } catch (PatternSyntaxException e) {
            return false;
        }
    }
}
