2018年7月8日
摘要: 一些常用的正则的表达式的总结'require' => '/.+/','email' => '/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/','url' => '/^http(s?):\/\/(?:[A-za-z0-9-]+\.)+[A-za-z]{2 阅读全文
posted @ 2018-07-08 10:26 ZhanLi 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 正则匹配相应知识点str_replace("world","Shanghai","Hello world!"); //替换字符串中的指定的值,需要注意本函数区分大小写$str1=preg_replace($pattern,$replacement,$subject); //不管替换的值有没有改变都保 阅读全文
posted @ 2018-07-08 10:24 ZhanLi 阅读(163) 评论(0) 推荐(0) 编辑