forked from plusone/plusone-commons
内联变量。
parent
f480c27894
commit
be20e255b9
|
@ -1,13 +1,11 @@
|
||||||
package xyz.zhouxy.plusone.commons.util;
|
package xyz.zhouxy.plusone.commons.util;
|
||||||
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class RegexUtil {
|
public class RegexUtil {
|
||||||
|
|
||||||
public static boolean matches(CharSequence input, Pattern regex) {
|
public static boolean matches(CharSequence input, Pattern regex) {
|
||||||
Matcher m = regex.matcher(input);
|
return regex.matcher(input).matches();
|
||||||
return m.matches();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean matchesOr(CharSequence input, Pattern... regexs) {
|
public static boolean matchesOr(CharSequence input, Pattern... regexs) {
|
||||||
|
|
Loading…
Reference in New Issue