Simple expression question
I've been messing with this for about an hour now and I know it is so simple but I can't find the right syntax.
I have a 1000+ line file with multiple path references such as /opt/www/html/images The issue is I have multiple subdirectories within html that need to reference the images directory relatively by ../images or ../../images I want to use VI to do a global replace however it does not like the extra slash eg. %s/images/../images/g Error Trailing Characters Can someone tell me how to fix this. I have tried using "quotes" and 'literals' however with no success. I'm still learning so thanks for the help : > window$ |
try using the \ before the slashes in your expression
|
:%s/\images/..\/images
The above worked thanks!. I knew it was simple I was trying to put the \ before the .. so that it didn't like. Thanks again |
All times are GMT -5. The time now is 11:47 PM. |