列子
$strs="ab12gh23";
$patternsnum = "/\d+/";
$patternsstr = " /[a-z]+/";
preg_match_all($patternsnum,$strs,$arr);
preg_match_all($patternsstr,$strs,$arrs);
dd(array_combine($arrs[0],$arr[0]));
列子
$strs="ab12gh23";
$patternsnum = "/\d+/";
$patternsstr = " /[a-z]+/";
preg_match_all($patternsnum,$strs,$arr);
preg_match_all($patternsstr,$strs,$arrs);
dd(array_combine($arrs[0],$arr[0]));
本文标题:正则基础
本文链接:https://www.haomeiwen.com/subject/vgkvgxtx.html
网友评论