Java: Unterschied zwischen den Versionen

Aus wiki
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: «= Code Snippets = == Regex == === Pattern Matching === private String getAccessToken(String responseURL) { String patternString = "http://localhost:8080/mobile…»)
(kein Unterschied)

Version vom 28. Juli 2014, 15:58 Uhr

Code Snippets

Regex

Pattern Matching

private String getAccessToken(String responseURL) {
String patternString = "http://localhost:8080/mobile-client#(access_token%3D <http://localhost:8080/mobile-client#%28access_token%3D> (?<TOKEN>.+))%26token_type(.+%)";
Pattern pattern = Pattern.compile(patternString);
Matcher matcher = pattern.matcher(responseURL);
matcher.find();
return matcher.group("TOKEN");
}