Quote:
Originally posted by zazzybob
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).
|
ok but my_pattern_has_special_chars looks like
Code:
blabla 'toto' rep:/titi/toto/
so I protect it between #
if I understand what you mean, I should do like this:
Code:
:%s/^.*blabla\ \'toto\'\ rep\:\/titi\/toto\///
Am I right? (if it is the case, it si ok because my pattern never change)