@Test
public void test() {
Pattern pattern = Pattern.compile("\"(\\w+)\":\"(\\w+)\"");
Matcher m = pattern.matcher("\"KEY\":\"VAL\"");
m.group(1);
}
请问这个正则为什么无法匹配. 脑子进猪油了,现在
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你的表达式没什么问题,只是你得先调
m.find()再取m.group(1)