View Single Post
  #1   (View Single Post)  
Old 2nd December 2008
bigb89 bigb89 is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 69
Default Searching and replacing weird patterns on a file.

Hi guys,

Here's what I'm trying to accomplish:

I'm trying to replace the following pattern/line on a file:
Code:
<?php @include("http://".$_SERVER['HTTP_HOST']."/linkingblogv.php"); ?>
As you can see, the above pattern/line has certain characters that are treated "special" if you use sed, perl, etc to search and replace it. So in order for me to search for that line, I would have to use a lot of escape characters "\". But that would be time consuming and a lot of the times its not accurate.

So, is there anyway that I can search/replace for special patterns like that on a file without using escape characters?

Regards,
--Bigb89
Reply With Quote