mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add StrMatcher
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user