Java
Aus wiki
Version vom 28. Juli 2014, 15:58 Uhr von Christofbuechi (Diskussion | Beiträge) (Die Seite wurde neu angelegt: «= Code Snippets = == Regex == === Pattern Matching === private String getAccessToken(String responseURL) { String patternString = "http://localhost:8080/mobile…»)
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");
}