lv.ctco.cukesrest.internal.context.BaseContextHandler Maven / Gradle / Ivy
The newest version!
package lv.ctco.cukesrest.internal.context;
import java.util.*;
import java.util.regex.*;
public abstract class BaseContextHandler {
public static final String GROUP_PATTERN = "\\{\\(([\\w\\.-]+)\\)\\}";
protected List extractGroups(String pattern) {
List allMatches = new ArrayList();
Matcher m = Pattern.compile(GROUP_PATTERN).matcher(pattern);
while (m.find()) {
allMatches.add(m.group(1));
}
return allMatches;
}
}