add StrMatcher

This commit is contained in:
Looly
2021-03-05 22:37:41 +08:00
parent 047be5a1f8
commit 5646a1c3c0
3 changed files with 120 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package cn.hutool.core.text;
import cn.hutool.core.lang.Console;
import org.junit.Test;
import java.util.Map;
public class StrMatcherTest {
@Test
public void matcherTest(){
final StrMatcher strMatcher = new StrMatcher("${name}-${age}-${gender}-${country}-${province}-${city}-${status}");
final Map<String, String> match = strMatcher.match("小明-19-男-中国-河南-郑州-已婚");
Console.log(match);
}
}