I am using textmate to edit a file. I would like to remove all the lines not containing a word. Here is an example.
apple ipad
hp touch pad
samsung galaxy tab
motorola xoom
How can I remove all the line not containing the word "pad", and get this result, using Regular Expression?
apple ipad
hp touch pad
Replace ^(?!.*pad.*).+$
with empty string