正则匹配省市区

前端之家收集整理的这篇文章主要介绍了正则匹配省市区前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
String regEx="[^省]+省[^市]+市+[^区]+区"; Pattern p = Pattern.compile(regEx); Matcher m = p.matcher(city); while(m.find()){ System.out.println(m.group()); } 原文链接:https://www.f2er.com/regex/358313.html

猜你在找的正则表达式相关文章