DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird time issues schrodinger OpenBSD General 7 26th October 2009 03:20 PM
Weird network problem rex FreeBSD General 5 16th September 2008 02:05 AM
searching for a SP/PDA like device, advice needed TerryP Off-Topic 5 26th July 2008 03:54 AM
Weird NAT issues EvanED FreeBSD General 3 11th July 2008 11:02 PM
weird history problem mmusang FreeBSD General 2 17th May 2008 07:07 PM


All times are GMT. The time now is 09:44 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick