I tried to use find -type f -name "*.php" -exec sed -i.bak 's|"$_SERVER[\"DOCUMENT_ROOT\"]./|$_SERVER[\"DOCUMENT_ROOT\"]."/|gI' {} \;
to replace
<?php
include("$_SERVER["DOCUMENT_ROOT"]./info/benth_nav_top.php");
include_once("$_SERVER["DOCUMENT_ROOT"]./analyticstracking.php");
?>
to
<?php
include($_SERVER["DOCUMENT_ROOT"]."/info/benth_nav_top.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/analyticstracking.php");
?>
Unfortunately, it did not replace anything.
What did I miss?
Thank you in advance
[...]
in regexes is special,"
isn't.