测试

 

 

使用Windows live Writer编写博客

 

测试代码

 

/**
     * 从一段文本中检索出唯一的结果
     * @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;
    }
posted on 2014-09-26 23:46  inevermore  阅读(158)  评论(0编辑  收藏  举报