com.github.siwenyan.si.model.VarExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of side Show documentation
Show all versions of side Show documentation
Java runner of Selenium IDE project
package com.github.siwenyan.si.model;
import java.util.HashSet;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class VarExpression {
public static final Pattern pattern = Pattern.compile("(\\$\\{([^\\{\\}]+)\\})");
public static Set extractVariableNames(String s) {
Set variableNameSet = new HashSet();
Matcher matcher = VarExpression.pattern.matcher(s);
while (matcher.find()) {
variableNameSet.add(matcher.group(2));
}
return variableNameSet;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy