Here is the string
abcd&fq=-(( +ExpirationDate:[* TO *] -ExpirationDate:[2016-12-13T08:00:00Z TO *]))&fq=-SupplierId:\"systemid:1000008557\"&fq=-Id:\"systemid:1000009073\"&rows=20&arches.preview=false&sort=score desc,DefaultRelevance desc&bmf=50&wt=text";
Would like to get the below as the output
fq=-(( +ExpirationDate:[* TO *] -ExpirationDate:[2016-12-13T08:00:00Z TO *]))
fq=-Id:\"systemid:1000008557\"&fq=-Id:\"systemid:1000009073\"
Tried as below
String regex = "fq=.*&";
Pattern p = Pattern.compile(regex);
matcher = p.matcher(str);
while (matcher.find()) {
System.out.println(matcher.group());
}
But got output as
fq=-SupplierId:\"systemid:1000008557\"&fq=-Id:\"systemid:1000009073\"&rows=20&arches.preview=false&sort=score desc,DefaultRelevance desc&bmf=50&