欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php多個字符串替換成同一個的解決方法

 更新時間:2013年06月18日 17:22:47   作者:  
本篇文章是對php多個字符串替換成同一個的方法進行了詳細的分析介紹,需要的朋友參考下
復(fù)制代碼 代碼如下:

<?php
$name = 'Today 3? , very/ cold';
$name = strtolower($name);
//$name = preg_replace('/[^a-z0-9\s]/','',$name);
$name = preg_replace('/[\.\s+\?,\/"]/','_',$name); //change spaces
echo $name;
?>

其中
復(fù)制代碼 代碼如下:

$name = preg_replace('/[\.\s+\?,\/"]/','_',$name); //change spaces

\.\s+\?,\/"為正則表達式,表示查找.   空符號    ?    /     "        這五個字符
其他可自行添加,添加的時候要查找正則手冊

相關(guān)文章

最新評論