fex icon indicating copy to clipboard operation
fex copied to clipboard

Make regexp selection support behave better

Open jordansissel opened this issue 12 years ago • 1 comments

% cat /var/log/messages | fex '0/foo/...'

Something like that to be able to use fex to filter input but without having to resort to this pattern:

% some input | grep pattern | fex ...

jordansissel avatar Mar 05 '12 19:03 jordansissel

For a hacky work around, I have found this to be useful:

  • pick a field splitter that doesn't exist in the input (effectively makes entire lines a 'field')
  • use regexp to select only those fields (lines) that match

Example, using backslash as the 'field separator' here, since it is infrequent in most outputs:

% cat /var/log/messages | fex '\/some pattern/'

The above effectively acts like | grep 'some pattern'

jordansissel avatar Mar 05 '12 19:03 jordansissel