The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
vi + regexp + substitute
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
vi + regexp + substitute
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
12-10-2004
zazzybob
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
zazzybob
View Public Profile
Visit zazzybob's homepage!
Find all posts by zazzybob
Find zazzybob's past nominations received
Find zazzybob's present nominations given