miaomao

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

This is a demo test for the publishment of my bolg.

Code test:

/**
* 从一段文本中检索出唯一的结果
* @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;
}
/**
* 从一段文本中检索出唯一的结果
* @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;
} 

picture test:

未命名

posted on 2014-03-14 15:30  miaomao  阅读(119)  评论(0编辑  收藏  举报