
com.aventstack.chaintest.util.RegexUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chaintest-core Show documentation
Show all versions of chaintest-core Show documentation
Core Java client library for ChainTest framework
The newest version!
package com.aventstack.chaintest.util;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegexUtil {
public static String match(final String pattern, final String text, final int group) {
final Matcher m = Pattern.compile(pattern).matcher(text);
if (m.find()) {
return m.group(group);
}
return null;
}
public static String match(final String pattern, final String text) {
return match(pattern, text, 0);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy