• Post Reply Bookmark Topic Watch Topic
  • New Topic

Regular Expressions Help needed  RSS feed

 
Maalti Iyer
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I'm new to Regular Expressions. I need to get all the lines in a file who does not contain a particular word.

I have a file of records and I need to strip only the record that does not contain the word 'Mercury' on it. Can someone help me out on this?.

Thanks for your time.
Maalti
 
M Beck
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what tool are you using to search through your file? if it's "grep", the "-v" command line option will invert a search to report everything not matching the regex.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!