实现代码如下:

/**
* 小时:分钟的正则表达式检查<br>
* <br>
* @param pInput 要检查的字符串
* @return boolean 返回检查结果
*/
public static boolean isUrl (String pInput) {
if(pInput == null){
return false;
}
String regEx = " ^([0-1]{1}\d|2[0-3]):([0-5]\d)$";

Pattern p = Pattern.compile(regEx);
Matcher matcher = p.matcher(pInput);
return matcher.matches();
}

以上就是【javascript 小时:分钟的正则表达式】的全部内容了,欢迎留言评论进行交流!

赞(0) 踩(0)

与本文相关的软件

发表我的评论

最新评论

  1. 暂无评论