This commit is contained in:
Looly 2022-06-16 13:05:53 +08:00
parent ea4bc023af
commit 231e0cf1d7

View File

@ -150,6 +150,14 @@ public class ReUtilTest {
Assert.assertEquals("[", s);
}
@Test
public void escapeTest3(){
String context = "{prefix}_";
String regex = "{prefix}_";
final boolean b = ReUtil.isMatch(ReUtil.escape(regex), context);
Assert.assertTrue(b);
}
@Test
public void getAllGroupsTest() {
//转义给定字符串为正则相关的特殊符号转义