Really simple question: how can I preg_replace the backslash character?
preg_replace
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).
\
\\
2.1m questions
2.1m answers
60 comments
57.0k users