php用正则匹配将符号替换为空格
<?php $character = "!@#$%^&*中'文中'文中'文().,<>|[]'\":;}{-_+=?/abcdefgh中'文ijklmnopqrstuvwx中'文yzABCDEFGHI中文JKLMNOPQRSTUVWXYZ~`中'文文文文文";$reg = "/[[:punct:]]/i";$character = preg_replace($reg, '', $character);print_r($character);die;?>
php用正则匹配将符号替换为空格
<?php $character = "!@#$%^&*中'文中'文中'文().,<>|[]'\":;}{-_+=?/abcdefgh中'文ijklmnopqrstuvwx中'文yzABCDEFGHI中文JKLMNOPQRSTUVWXYZ~`中'文文文文文";$reg = "/[[:punct:]]/i";$character = preg_replace($reg, '', $character);print_r($character);die;?>
本文是由用户编写整理,所有内容的版权归原作者所有。如果侵犯了您的权益,请联系我删除