My specific case is a text document that contains lots of text and IPv4 addresses. I want to remove everything except for the IP addresses.
I can use :vglobal<
:vglobal<
In short, I'm looking for a way to do this without leaving vim
Easy enough:
:1,$! grep --extended-regexp --only-matching --regexp="([0-9]{1,3}\.){3}[0-9]{1,3}"
(though I actually voted up icecrime's substitution answer)