我现在有一个字符串
String str= "[权利要求 5] 如权利要求 4所述 的墨盒 ,其特征在于 :"
想要提取到第几号权力要求
Pattern p = Pattern.compile("^\[权利要求 (\d)\]");
Matcher m = p.matcher(str);
if(m.find()){
System.out.println("["+m.group()+"]");
}
总是匹配不到,求解
我现在有一个字符串
String str= "[权利要求 5] 如权利要求 4所述 的墨盒 ,其特征在于 :"
想要提取到第几号权力要求
Pattern p = Pattern.compile("^\[权利要求 (\d)\]");
Matcher m = p.matcher(str);
if(m.find()){
System.out.println("["+m.group()+"]");
}
总是匹配不到,求解