Search within search results?

Is there any way to either search within search results or apply a text-based filter (rather than a file location / file status filter) to the search results?

There are a number of occasions whereby I've searched for a particular string across one or more files and then realised that I wanted to narrow it down to find lines which also contained another string as well. I know that this is possible by using a regular expression in the original search, but it would often be a lot quicker to do a quick text search within the original results.

5 comments
Comment actions Permalink

Hi there,

Search again, choose "Scope | Custom" and choose "Files in Previous Search Result"

screen01.png

4
Comment actions Permalink

I'd missed that option and it does something like what I'm looking for, but still not quite there.

For example, if I wanted to find all the lines that mention something to do with a 'table' and also contain the word 'echo' (laying aside the option of constructing a regular expression to achive this), then I could search the files for the word 'table' and then search again (within the same files) for the word 'echo'.

This would give me all the lines containing the word 'echo' within the files that also contained the word 'table', but it would not give me all the lines that contained the words 'echo' and 'table'.

0
Comment actions Permalink

Correct.

The only way to search for all occurrences/lines where all words are present is to use Regular Expression in first place. (advanced search requires advanced syntax/functionality. Why invent/code something new (additional/sub search) if already supported RegEx fits this role perfectly).

0
Comment actions Permalink

OK - fair point.

The only reason I asked, is there are a number of situations where I've done a search (possibly already involving a regular expression), got too many results to manually skim through and then wanted a quick way to narrow them down further and find the result I wanted, without having to get my brain into gear and write a regular expression to do it.

0
Comment actions Permalink

That is absolutely valid point -- no doubts here.

If you wish -- you can file Feature Request ticket to the Issue Tracker, but most likely it will be put into backlog ("maybe some day in few years time") or will be rejected as obsolete/won't fix (because of already existing RegEx support).

0

Please sign in to leave a comment.