import java.util.*;
import java.util.regex.*;
class rTest {
public static void main
(String[] args
) {
String result
= "<input type=\"hidden\" name=\"token\" value=\"YToxOntzOjU\"/>";
Pattern pattern = Pattern.compile("name=\"(token)\"[^>]*value=\"([^\"]+)\"", 2);
Matcher matcher = pattern.matcher(result);
if (matcher.find()) {
String value
= matcher.
group(2); }
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS51dGlsLnJlZ2V4Lio7CgoKY2xhc3MgclRlc3QgewogIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB7CgogICAgU3RyaW5nIHJlc3VsdCAgPSAiPGlucHV0IHR5cGU9XCJoaWRkZW5cIiBuYW1lPVwidG9rZW5cIiB2YWx1ZT1cIllUb3hPbnR6T2pVXCIvPiI7CgogICAgUGF0dGVybiBwYXR0ZXJuID0gUGF0dGVybi5jb21waWxlKCJuYW1lPVwiKHRva2VuKVwiW14+XSp2YWx1ZT1cIihbXlwiXSspXCIiLCAyKTsKICAgIE1hdGNoZXIgbWF0Y2hlciA9IHBhdHRlcm4ubWF0Y2hlcihyZXN1bHQpOyAKCiAgICBpZiAobWF0Y2hlci5maW5kKCkpIHsKICAgICAgIFN0cmluZyB2YWx1ZSA9IG1hdGNoZXIuZ3JvdXAoMik7CiAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4odmFsdWUpOwogICAgfQoKICB9Cn0=