/**   
 * @Title: RegexUtil.java 
 * @Package me.pc.mobile.helper.util 
 * @Description: TODO
 * @author SilentKnight || happychinapc[at]gmail[dot]com   
 * @date 2014 2014年12月4日 下午4:45:45 
 * @version V1.0.0   
 */
package me.pc.mobile.helper.v14.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @ClassName: RegexUtil
 * @Description: TODO
 * @author SilentKnight || happychinapc@gmail.com
 * @date 2014年12月4日 下午4:45:45
 * 
 */
public final class RegexUtil {
	private RegexUtil() {
	}

	public static String compile(String source, String regex, String newValue) {
		Pattern patterns = Pattern.compile(regex);
		Matcher matcher = patterns.matcher(source);
		if (matcher.find()) {
			for (int i = 0; i < matcher.groupCount(); i++) {
				String group = matcher.group(i);
				source.replace(group, newValue);
			}
		}
		return source;
	}
}

@@ -483,16 +483,18 @@
 xUtil %7B%0A
+%09%0A
 %09private
@@ -512,16 +512,1268 @@
 ) %7B%0A%09%7D%0A%0A
+%09public static final String EMAIL_REGEX = %22%5E%5C%5Cs*%5C%5Cw+(?:%5C%5C.%7B0,1%7D%5B%5C%5Cw-%5D+)*@%5Ba-zA-Z0-9%5D+(?:%5B-.%5D%5Ba-zA-Z0-9%5D+)*%5C%5C.%5Ba-zA-Z%5D+%5C%5Cs*$%22;%0A%09public static final String MOBILE_NUM_REGEX = %22%5E(%5C%5C+86)?((13%5B0-9%5D)%7C(15%5B%5E4,%5C%5CD%5D)%7C(18%5B%5E4,%5C%5CD%5D)%7C(170))%5C%5Cd%7B8%7D$%22;%0A%09public static final String QQ_REGEX = %22%5E%5B1-9%5D%5B0-9%5D%7B4,9%7D$%22;%0A%0A%09/**%0A%09 * @Title: isEmailValid%0A%09 * @Description: verify a valid email address%0A%09 * @param email%0A%09 * @return boolean%0A%09 * @throws null%0A%09 */%0A%09public static boolean isEmailValid(String email) %7B%0A%09%09boolean flag = false;%0A%09%09flag = email.matches(EMAIL_REGEX);%0A%09%09return flag;%0A%09%7D%0A%0A%09/**%0A%09 * @Title: isMobileNumValid%0A%09 * @Description: verify a valid mobile number%0A%09 * @param mobileNum%0A%09 * @return boolean%0A%09 * @throws null%0A%09 */%0A%09public static boolean isMobileNumValid(String mobileNum) %7B%0A%09%09boolean flag = false;%0A%09%09flag = mobileNum.matches(MOBILE_NUM_REGEX);%0A%09%09return flag;%0A%09%7D%0A%0A%09/**%0A%09 * @Title: isQQNumValid%0A%09 * @Description: TODO%0A%09 * @param qq%0A%09 * @return boolean%0A%09 * @throws%0A%09 */%0A%09public static boolean isQQNumValid(String qq) %7B%0A%09%09boolean flag = false;%0A%09%09flag = qq.matches(QQ_REGEX);%0A%09%09return flag;%0A%09%7D%0A%0A%09/**%0A%09 * @Title: compile%0A%09 * @Description: TODO%0A%09 * @param @param source%0A%09 * @param @param regex%0A%09 * @param @param newValue%0A%09 * @param @return%0A%09 * @return String%0A%09 */%0A
 %09public 

Update RegexUtil.java