import java.util.*;
import java.util.regex.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
String s
= "Min value = 5000 km"; // A Capturing Group
Matcher m = Pattern.compile("value\\s*=\\s*(\\d+)").matcher(s);
if(m.find()) {
System.
out.
println(m.
group(1)); }
// A constrained width lookbehind
m = Pattern.compile("(?<=value\\s{0,10}=\\s{0,10})\\d+").matcher(s);
if(m.find()) {
System.
out.
println(m.
group()); }
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS51dGlsLnJlZ2V4Lio7CmltcG9ydCBqYXZhLmxhbmcuKjsKaW1wb3J0IGphdmEuaW8uKjsKCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlTdHJpbmcgcyA9ICJNaW4gdmFsdWUgPSA1MDAwIGttIjsKCQkvLyBBIENhcHR1cmluZyBHcm91cAoJICAgIE1hdGNoZXIgbSA9IFBhdHRlcm4uY29tcGlsZSgidmFsdWVcXHMqPVxccyooXFxkKykiKS5tYXRjaGVyKHMpOwoJICAgIGlmKG0uZmluZCgpKSB7CgkgICAgCVN5c3RlbS5vdXQucHJpbnRsbihtLmdyb3VwKDEpKTsKCSAgICB9CgkgICAgLy8gQSBjb25zdHJhaW5lZCB3aWR0aCBsb29rYmVoaW5kCgkgICAgbSA9IFBhdHRlcm4uY29tcGlsZSgiKD88PXZhbHVlXFxzezAsMTB9PVxcc3swLDEwfSlcXGQrIikubWF0Y2hlcihzKTsKCSAgICBpZihtLmZpbmQoKSkgewoJICAgIAlTeXN0ZW0ub3V0LnByaW50bG4obS5ncm91cCgpKTsKCSAgICB9CgkgICAgCgl9Cn0=