且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP preg_replace \

更新时间:2021-07-03 17:18:10

是的,但是您需要对其进行转义.在正则表达式中使用它时,请使用\\来代替它,请使用\\\\(它将变成\\,将被解释为单个反斜杠).

Yes, but you need to escape it. When using it in the regexp use \\ to use it in the replacement, use \\\\ (that will turn into \\ that will be interpreted as a single backslash).