摘要: servlet类:@Controllerpublic class MyController01 { @InitBinder("customer") public void initBinder1(WebDataBinder binder){ binder.setFieldDefaultPrefix("customer."); } @InitBinder("user") public void initBinder2(WebDataBinder binder){ binder.setFieldDefaultPrefix("us 阅读全文
posted @ 2013-12-17 17:45 prison 阅读(446) 评论(0) 推荐(0)
摘要: 1、判断字符串是否含字母:Pattern.compile("(?i)[a-z]").matcher(phone).find()/** * 电话号码截取 * 1、排除含有字母的电话 * 2、多个电话、只取第一个可用电话 * @param phone * @return */ public String parsePhone(String phone){ if(phone == null) return phone; if(phone.matches("^\\(?\\d{3,4}[-\\)]?\... 阅读全文
posted @ 2013-12-17 10:37 prison 阅读(142) 评论(0) 推荐(0)