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

jporkkahtc

  • Senior Community Member
  • Posts: 1715
  • Hero Points: 169
  • 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: 1241
  • Hero Points: 124
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

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2618
  • Hero Points: 401
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

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2618
  • Hero Points: 401
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/