Sed issue (regex syntax) -


I am trying this SAD to replace the string:

  Find - Type f -name "* .php" -exec sed -i "s | \! Preg_match (\" \! Module \ .php \! \ ", \\\ $ _ server [[PHP_SELF '\]) \ {| \! Preg_match (\ "\! Module \\\. Php \! \", \\\ $ _Server [['PHP_SELF' \])) \ {| g "{}"; " 

but I have an error message (error in pairing)

I did not get good syntax to do this. I just want to add a round bracket to all the files at the end ...

[edit] OK, get it ...

  find-type f - Name "* .php" -exec sed -i "s | \! Preg_match (\" \! Module \\\. Php \! \ ", \\\ $ _ server [[PHP_SELF '\]) {| \! Preg_match (\ "\! Module \\\. Php \! \", \\\ $ _ server [[PHP_SELF '\])) {| g "{}"; " 

To avoid reDescus and other programming languages, use single quotes instead of double quotes pass on the command line from bish. .


Comments