测试

来源:互联网 发布:网络交换机怎么安装 编辑:程序博客网 时间:2024/06/08 08:38
/**     * 从一段文本中检索出唯一的结果     * @param regx 正则表达式语句     * @param text 要检索的文本     * @return     */    public String regx(String regx,String text)    {        Matcher matcher=Pattern.compile(regx).matcher(text);        if(matcher.find())            return matcher.group();        else            return null;    }
0 0