时间:2021-07-01 10:21:17 帮助过:19人阅读
 代码如下:
/** 
* 小时:分钟的正则表达式检查<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(); 
}