Using Perl find I cannot successfully escape a DOCTYPE declaration in search string. Here is an example of a string that I am searching for;
find . -type f|xargs -d "\n" perl -pi -e 's/ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1\.0 Transitional//EN" "http://www\.w3\.org/TR/xhtml1/DTD/xhtml1-transitional\.dtd">//g'
to replace the doctype declaration with nothing. Please if someone can properly escape this string so that a perl find can find any string would greatly be appreciated.
You can use other delimiters besides
/in Perl. Try this:Since the slash is no longer delimiting the regex, it is safe to use.