SitePoint Forums | Web Development & Design Community
How to escape replacement string for preg_replace?
PHP
crmalibu
January 5, 2010, 3:53pm
9
I think the issue is if the user supplied string contains a backreference like $1 or \1 etc…
show post in topic
Related topics
Topic
Replies
Views
Activity
preg_replace remove my first digit for no reason :(
PHP
4
1510
June 27, 2011
Replacement string that comes from database
PHP
3
409
September 7, 2011
Applying the '\\' escape character to unescaped single quotes (') with preg_replace()?
PHP
17
35125
October 8, 2014
Problem with preg_replace
PHP
4
651
October 8, 2014
preg_replace confusion
PHP
9
959
June 8, 2010