Author Topic: FiF: Can it do the equivalent of "grep -v" ?  (Read 1617 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
FiF: Can it do the equivalent of "grep -v" ?
« on: April 01, 2019, 07:06:05 PM »
As in, find all lines in the set of files that do *not* match the pattern?


Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: FiF: Can it do the equivalent of "grep -v" ?
« Reply #1 on: April 01, 2019, 08:19:37 PM »
No, there is not, but I can file a feature request.  While I am sure it has very valid use cases, a feature like that has the potential to generate a lot of output. Listing entire files with zero matching lines seems like high noise ratio, but we can evaluate it for future feature enhancement.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: FiF: Can it do the equivalent of "grep -v" ?
« Reply #2 on: April 01, 2019, 09:25:45 PM »
This is SlickEdit regular expression syntax -- translate to Perl syntax as an exercise for the user.
Code: [Select]
^\c?@(#<!(CANT_TOUCH_THIS)?@)$

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: FiF: Can it do the equivalent of "grep -v" ?
« Reply #3 on: April 01, 2019, 09:29:26 PM »
Also, using selective display:

View > Selective Display... > Search Text... > (x) Hide all matched lines

Or from the command line:

Code: [Select]
allnot/HAMMER_TIME/