import java.util.*;
import java.util.regex.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
final String text
= "This is param-start ?abcdef; param-end"; final String patternString
= "(['\"]?)\\?.*?;\\1"; final Pattern pattern = Pattern.compile(patternString, Pattern.DOTALL);
final Matcher matcher = pattern.matcher(text);
while (matcher.find()) {
System.
out.
println("Match found: " + matcher.
group()); }
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS51dGlsLnJlZ2V4Lio7CmltcG9ydCBqYXZhLmxhbmcuKjsKaW1wb3J0IGphdmEuaW8uKjsKCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlmaW5hbCBTdHJpbmcgdGV4dCA9ICJUaGlzIGlzIHBhcmFtLXN0YXJ0ID9hYmNkZWY7IHBhcmFtLWVuZCI7CgkgICAgZmluYWwgU3RyaW5nIHBhdHRlcm5TdHJpbmcgPSAiKFsnXCJdPylcXD8uKj87XFwxIjsKCSAgICBmaW5hbCBQYXR0ZXJuIHBhdHRlcm4gPSBQYXR0ZXJuLmNvbXBpbGUocGF0dGVyblN0cmluZywgUGF0dGVybi5ET1RBTEwpOwoJICAgIGZpbmFsIE1hdGNoZXIgbWF0Y2hlciA9IHBhdHRlcm4ubWF0Y2hlcih0ZXh0KTsKCSAgICB3aGlsZSAobWF0Y2hlci5maW5kKCkpIHsKCSAgICAJU3lzdGVtLm91dC5wcmludGxuKCJNYXRjaCBmb3VuZDogIiArIG1hdGNoZXIuZ3JvdXAoKSk7CgkgICAgfQoJfQp9