preg_replace question

From: Date: Wed, 12 Dec 2012 16:11:08 +0000
Subject: preg_replace question
Groups: php.general 
Request: Send a blank email to php-general+get-319854@lists.php.net to get a copy of this message
I have several poisoned .js files on a server. I can use find to recursively find them and then use preg_replace to replace the string. However the string is filled with single quotes, semi-colons and a lot of other special characters. Will preg_relace(escapeshellarg($String),$replacement) work or do I need to go through the entire string and escape what needs to be escaped? --C

« previous php.general (#319854) next »