:g!/www\.example\.com/d
Showing posts with label regular. Show all posts
Showing posts with label regular. Show all posts
Tuesday, January 14, 2014
Removing Lines that Don't Match a Pattern
Following up on a previous tip, you can also use the "g" and "d" commands to remove lines in your current buffer that don't match a specific pattern. The following example would remove all lines that don't match "www.example.com".
Subscribe to:
Posts (Atom)