![]() |
quick vi problem :| (search and replace)
im trying to search and remove all instances of "../"
im using %s@../@@gc but its not doing it.. anyone use this program? its fucking voodoo to me :) |
|
Quote:
|
Ok hehe.. you can always open it in pico too, it's an easier editor. vi is kinda outdated
try: pico file.txt |
Wait, you want to do ../ right, maybe you should add a backslash in front of the slash, or maybe you should try [../]
|
Quote:
|
See, in perl i would have either used the backslash idea or the [../] idea. If they don't do anything, then try: s^../^^g
if that doesnt do anything then you should get the file to notepad and do it there, but that might leave windows newlines you don't want hehe. |
trying what you suggested now :)
|
Quote:
damn voooddooooooooo :S. !!! i will keep googling :) |
:1,$s/\.\.\///g
|
. is wildcard, it must be escaped
/ is special char, it must be escaped |
That's probably since a '.' is usually preserved for something too... that's why I suggested [../] instead of ../, which is the way to go with perl hmm.. i have no idea then.
|
Quote:
|
yay. hehe well.. close :D.
|
Quote:
|
forget it.. someone already posted it .
doh |
| All times are GMT -7. The time now is 10:37 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123