lineIdentifier:dasda creationDate:[08/06/2018 00:00:00 TO *] text: [dasda, lll]
使用regex
我想仅返回creationDate
08/06/2018 00:00:00
和*
这是我的模式,但不起作用
Pattern r = Pattern.compile("\\[(\\w*)\\]");
Matcher m = r.matcher(result);
if (m.find( )) {
System.out.println("Found value: " + m.group(0) );
}else {
System.out.println("NO MATCH");
}
知道我在做什么吗?
答案 0 :(得分:2)
您可以尝试:
select