package com.yida.data.common.core.utils;

import java.util.regex.Pattern;

/**
 * 正则工具类
 */
public class RegexUtil {

    // 带头的图片base64编码
    public static final Pattern BASE64_IMG_HEAD_PATTERN = Pattern
        .compile("\\s*data:([a-z]+\\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;" +
            "base64)?,([A-Za-z0-9+/]{4}){2,}(?:[A-Za-z0-9+=]{4})");
    // 不带头的图片base64编码
    public static final Pattern BASE64_IMG_PATTERN = Pattern.compile("([A-Za-z0-9+/]{4}){2,}(?:[A-Za-z0-9+=]{4})");
}
