public static String match(String reg, String text) {
        Pattern pattern = Pattern.compile(reg);
        Matcher m       = pattern.matcher(text);
        if (m.find()) {
            return m.group(1);
        }
        return null;
    }
public static String match(String reg, String text) {
        Pattern pattern = Pattern.compile(reg);
        Matcher m       = pattern.matcher(text);
        if (m.find()) {
            return m.group(1);
        }
        return null;
    }
public static String match ( String reg , String text ) { Pattern pattern = Pattern . compile ( reg ) ; Matcher m = pattern . matcher ( text ) ; if ( m . find ( ) ) { return m . group ( 1 ) ; } return null ; }
正则匹配

@param reg
@param text
@return
正则匹配