I am trying to search a text file for a certain pattern. If this pattern occurs then it means that the rest of the line is not needed and therefore can be deleted.
I ha
To replace a pattern and whatever else use the regular expression wild card .*
.*
:1,$s/pattern.*//g