0
是否存在preg_replace()
的正則表達式,它將替換字符串中的字符(如果它位於單/雙引號和圓/方括號/大括號之間)。php preg替換容器內的字符
E.g.
$var = "(replace, here) not,here 'but, here' , [and, this too] , \"oh, escaped as well\", ";
echo preg_replace($pattern, ".", $var);
將返回:
(replace. here) not,here 'but. here' , [and. this too] , "oh. escaped as well",
我吸的正則表達式。所以任何幫助將不勝感激。
乾杯。