[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Vi search and replace



Phil wrote:
Hello,

I am trying to do a search and replace in vi but I need to search and replace on "/T"

so how do I escape the /?

%s/"/T"/T/g obvisouly does not work....

how do I specify a / in the vi search string?
One method not yet mentioned, is to use the ? character as the separator when performing functions against the / character:

:g?/T?s??/Tommy?g

means: search and replace all occurrences of /T with /Tommy

Forgive my old regex style. :)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]