内联变量。

feature/net-util
ZhouXY108 2023-03-10 18:05:20 +08:00
parent f480c27894
commit be20e255b9
1 changed files with 1 additions and 3 deletions

View File

@ -1,13 +1,11 @@
package xyz.zhouxy.plusone.commons.util;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegexUtil {
public static boolean matches(CharSequence input, Pattern regex) {
Matcher m = regex.matcher(input);
return m.matches();
return regex.matcher(input).matches();
}
public static boolean matchesOr(CharSequence input, Pattern... regexs) {