import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Example {
public static void main(String[] args) {
final String regex = "(?!0)\\d+[\\u4e00-\\u9fa5、/()]+(?<![()()/、])";
final String string = "民事公益诉讼起诉率=((200民事公益诉讼起诉案件数(件)+民事公益诉讼两支案件数(件))/(201民事公益诉讼立案案件数(件)+民事公益诉讼立案积存数(件)))*100%\n"
+ "检管平台数据+人工(政务内网2.0案件数据)\n"
+ "39开展追赃挽损工作率=(37经济类、侵财类犯罪案件中检察机关开展追赃挽损工作(件))/38经济类、侵财类犯罪案件审结数(件))*100%\n"
+ "87被刑事申诉纠正率=((250经申诉被改变原逮捕/不捕决定数(人)+251经申诉被改变原起诉/不起诉决定数(人))/86刑事申诉案件审结(人))*100%\n"
+ "民事案-件比=7件数/8案数\n"
+ "181行政执行(含非诉执行)监督检察建议采纳率=(179行政执行(含非诉执行)监督案件检察建议采纳数(件)/180行政执行(含非诉执行)监督案件检察建议数(件))*100%\n\n\n\n\n";
final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
final Matcher matcher = pattern.matcher(string);
while (matcher.find()) {
System.out.println("Full match: " + matcher.group(0));
for (int i = 1; i <= matcher.groupCount(); i++) {
System.out.println("Group " + i + ": " + matcher.group(i));
}
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Java, please visit: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html