I have googled this several times over the years and have not found a good solution so I am giving up and asking.
I want to be able to delete all words and punctuations that do not match a pattern.
So say i have this list
R61,1,BWRBW0471,1
R14,1,BWRBW0471,1
R162,1,BWRBN0471,1
R61 ,1,BWRBN0471,1
R61 ,1,BWRBN0471,1
R61 ,1,BWRBN0471,1
I want to remove everything BUT bwrb.*471,[0-9] so i am left with
BWRBW0471,1
BWRBW0471,1
BWRBW0471,1
BWRBW0471,1
BWRBW0471,1
BWRBW0471,1
Is there a easy VIM command that can accomplish?
thanks.