Java

Aus wiki
Wechseln zu: Navigation, Suche

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");
}