View Full Version : [ubuntu] Any vi experts out there?
September 10th, 2008, 02:16 AM
I'm trying to delete all occurrences of '.' (i.e. one full-stop) in a document. I'm trying to use global search and replace with
Which, of course, doesn't work.
September 10th, 2008, 04:23 AM
The dot is a regular-expression thingy. You have to escape it with a backslash if you want to use it literally.
More specifically, the dot represents “any character”; so, using it unescaped in your example will delete the entire file.
September 10th, 2008, 09:24 AM
Ah, of course. Thanks. I'll need to dig out my Mastering Regular Expressions manual..
September 12th, 2008, 01:07 AM
Happy to help out.
Perhaps you could use the “Thread Tools” menu to mark this as Solved.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.