java正则表达式验证函数
时间:2021-04-08 10:39:37|栏目:|点击: 次
复制代码 代码如下:
/**
* 验证 正则表达式
*
* @author zhujie regex 正则表达式 value 所属字符串
* @return boolean
*/
public static boolean regex(String regex, String value) {
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(value);
return m.find();
}
栏 目:
下一篇:Powershell小技巧之通过EventLog查看近期电脑开机和关机时间
本文标题:java正则表达式验证函数
本文地址:http://www.codeinn.net/misctech/97109.html






