Home >Backend Development >PHP Tutorial > 正则表达式,该怎么处理

正则表达式,该怎么处理

WBOY
WBOYOriginal
2016-06-13 13:40:101036browse

正则表达式
this is test  

把is 替换成 a 但 this不能变

------解决方案--------------------
echo preg_replace('/\bis\b/', 'a', 'this is test');//this a test

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn