Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I was wondering how I would search and replace all /'s with -'s in vi.
%s///-/g doesn't work obviously.
Try escaping your /s, with a \.
\/. yes, it looks awful. That's how I remember it :P
You can use any delimiter you wish, not just /. For example, !:
This way, / becomes non-special and doesn't have to be escaped.
replacing separator is not always /.
in the text of "http://hoge/hoge"
8 years, 9 months ago
6 years, 10 months ago