php 正则替换

$str = "The quick brown fox jumped over the lazy dog.";
$str = preg_replace('/s/','-',$str);
echo $str;

更详细的请看原著
摘抄自http://www.5idev.com/p-php_preg_replace.shtml
原文地址:https://www.cnblogs.com/zonglonglong/p/7710760.html