一、随机生成有大小写字母/数字组成的字符串
如果有其他好的想法欢迎留言…
package com.sucsoft.organization.utils;
import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author ouyz
* @description
* @date 2020-07-07 10:49
*/
public class AlphaNumericUtil {
/**
* 判断字符串是否由 字母/数字/_ 组成
*
* @param s 待检测字符串
* @return boolean
*/
public static boolean isAlphaNumeric(String s) {
Pattern pattern = Pattern.compile("[0-9a-zA-Z_]+")<