2024-09-07 00:34:55
php正则表达式:/(?<=PHP)[\||'|\.]/i
完整的php程序如下:
<?php
$str = "PHP|s initialization 'file', generally called php.ini. is responsible for configuring many of the aspects of PHP's behavior.";
$s = preg_replace("/(?<=PHP)[\||'|\.]/i","#", $str);
echo $s;
?>
运行结果:
PHP#s initialization 'file', generally called php#ini. is responsible for configuring many of the aspects of PHP#s behavior.