21,891
社区成员
发帖
与我相关
我的任务
分享
preg_match_all('/^\$abc[a-z0-9_\[\]]*/i',$string,$matches);
var_dump($matches);
<?php
$string = <<<STR
\$abc
\$abc_123
\$abc[def]
\$abc[def_123]
STR;
preg_match_all("/[\$]abc[a-zA-Z0-9\[\]_]*/s", $string, $matches);
print_r($matches);
?>