Java
Aus wiki
Version vom 28. Juli 2014, 16:04 Uhr von Christofbuechi (Diskussion | Beiträge) (→Pattern Matching)
Code Snippets
Regex
Pattern Matching
Named Matching
private String getAccessToken(String responseURL) {
String patternString = "http://localhost/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");
}