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 with the word pad, and get this result, using Regular Expression??
apple ipad
hp touch pad
Thanks all.
Replace ^(?!.*pad.*).+$
with empty string