Code example for Matcher

Methods: groupmatches

0
    String resource = null;
 
    public Jid(String jid) {
        final Matcher fromMatcher = jidPattern.matcher(jid);
 
        if (fromMatcher.matches()) {
            user = fromMatcher.group(1);
            server = fromMatcher.group(2);
            resource = fromMatcher.group(3);
        } 
    } 
 
    public String getUser() {
        return user;
    } 
 
    public String getServer() {
        return server;
    } 
 
Connect your IDE to all the code out there  Get Codota for Java