The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 12-10-2004
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
I'm not too sure that I follow - but you can supress the interpretation of metacharacters by backslash escaping them...

e.g.

Code:
:%s/^.*my_patter_has_special_chars\*\/\$\^_in_it.*$//

As you can see, the .* at the beginning and end of line are still treated as metacharacters (as are the anchors).

Cheers
ZB