Title

Message

Confirm

Want to earn a free FileSeek Pro license? We're looking for FileSeek translators!
<< DiscussionsReply

feature request: find per line, and find not in file

Avatar from Gravatar.com
joshuawood
9 discussion posts
Hi,

I'd like to make 2 suggestions. An option to find all query words that are on the same line. eg, I might wish to only find results using a query such as "void string". This would return all results where a void method contained a string parameter, assuming my coding layout had them on the same line. Lines such as "void foo(int x)" or "string bar()" wouldn't not be matched.

Secondly, I sometimes wish to find files that do NOT contain a certain query. You can probably do this with regular expressions, so perhaps I should brush up on this. I'm not sure how to achieve the first suggestion with regex, if possible.

Thanks for listening.
Sep 25, 2010  • #1
Jon Tackabury (BFS)'s profile on WallpaperFusion.com
For your first question, just select "Match full string", then FileSeek will only match void string when the 2 words are beside each other. This should take care of that. As for your second request, this isn't possible in FileSeek right now, sorry.
Sep 27, 2010  • #2
Avatar from Gravatar.com
joshuawood
9 discussion posts
Thanks for your reply. I'm aware of the "match full string" option, but my first suggestion was matching each word per line. So you could read a query of "void string" per line as: Result is found when both "void" and "string" exist on the same line. They may or may not be next to each other, but both will exist somewhere on the same line. A result will not be found if "void" exists on a line but "string" does not, and similarly if "string" exists on a line but "void" does not.
Sep 29, 2010  • #3
Jon Tackabury (BFS)'s profile on WallpaperFusion.com
Sorry, I misunderstood a little bit. You can definitely do this using a regex, here is what you would use:

Code



Make sure you select "Treat Query as Regular Expression" and you should be all set. :)
Sep 29, 2010  • #4
Avatar from Gravatar.com
joshuawood
9 discussion posts
Thanks, that seems to work. Still trying to get my head around some regex stuff. Is the input "string" for the regex search per line? This is how it appears to work for me.
Oct 7, 2010  • #5
Jon Tackabury (BFS)'s profile on WallpaperFusion.com
Yes, the files are processed per-line, not the entire file at once. This limits what you can do with regex a little bit, but you should be able to find all the void strings matches.
Oct 8, 2010  • #6
Avatar from Gravatar.com
joshuawood
9 discussion posts
Would it be hard to add an option to process by line or whole file? This would allow regex searching for matches that do NOT exist in the file, which was my other question.

Or does this increase the processing of files exponentially or something massive?
Oct 11, 2010  • #7
Jon Tackabury (BFS)'s profile on WallpaperFusion.com
The only issue with whole-file processing is that you need to read the entire file into memory (which could be epic), and there are no progress indicators, it would look like FileSeek has frozen. If you had a file that was a few megs a regex could be crazy slow as well.
Oct 13, 2010  • #8
Was this helpful?  Login to Vote  Login to Vote
<< DiscussionsReply