📜  php match 复制匹配 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:20.301000             🧑  作者: Mango

代码示例2
$subject = "E:contact@customer.com I:100955";
$pattern = "/^E:(?\w+) I:(?\d+)$/";
if (preg_match($pattern, $subject,$matches)) {
    print_r($matches);
}