标签:
public class TestRegex {
public static void main(String[] args) {
String str = "BookName: \"我欲封天\",CategoryName: \"仙侠\", SubCategoryName: \"古典仙侠\"";
Pattern p = Pattern.compile("(?i)(?<=CategoryName\\: \")([\u4e00-\u9fa5]+)");
Matcher matcher = p.matcher(str);
while (matcher.find()) {
System.out.println(matcher.group());
}
}
}
标签:
原文地址:http://my.oschina.net/u/2329222/blog/501775