1、正则表达式判断功能:
public boolean matches(String regex):
2、正则表达式分割功能:
public String[] split(String regex):
3、正则表达式替换功能:
public String replaceAll(String regex,String replacement):
4、正则表达式获取功能:
Pattern类和Matcher类的使用
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(string);
find():查找是否存在。
group():获取刚才查找到的数据。