From be20e255b9a78a3df191f58b4ab8731897a1b578 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Fri, 10 Mar 2023 18:05:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E8=81=94=E5=8F=98=E9=87=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/xyz/zhouxy/plusone/commons/util/RegexUtil.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/RegexUtil.java b/src/main/java/xyz/zhouxy/plusone/commons/util/RegexUtil.java index 7550721..0b0df2d 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/util/RegexUtil.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/util/RegexUtil.java @@ -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) {