Find Files, Contents, Grep feature

Features wanted...
Ash
Posts: 8
Joined: 24 Nov 2009 12:40

Find Files, Contents, Grep feature

Post by Ash » 13 Oct 2011 03:33

I would just like to put in a vote for regular expression support in the "Find Files", Contents text box, effectively making this a Grep tool.

I often use XYPlorer to seach the contents of source code files and about 50 percent of the time the wildcard content matching is fine. Having regexp would resolve the remaining 50 percent.

For example with regexp I could search for all commented lines that contain the word todo, but that do not contain the word ignore.

I did some searching here on the forums and found there were one or two similar requests from a couple of years ago. However at the time, admin said that it was possible but not in the current roadmap.

There were also some technical issues in the handling of large files. For me, limiting regexp searches to single lines (ie XYPlorer applies regexp to one line at a time) would be good enough, maybe not for everyone though.

Thanks for a fantastic application, XYPlorer is a hugely productive tool for me.

Ash

Jerry
Posts: 708
Joined: 05 May 2010 15:48
Location: DysTrumpia

Re: Find Files, Contents, Grep feature

Post by Jerry » 14 Oct 2011 22:50

Ash wrote:I would just like to put in a vote for regular expression support in the "Find Files", Contents text box, effectively making this a Grep tool.
I heartily second that proposal.
Running on Windows 10 Pro 64-bit quad-core ASUS G752-VY notebook with 64 GB RAM, 20 or more external USB3 drives attached via 4 powered hubs, totaling 50+ TB.

admin
Site Admin
Posts: 46874
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Find Files, Contents, Grep feature

Post by admin » 19 Oct 2011 10:24

I can only offer an approach where the pattern must match at least one chunk of 1024 characters in the file.

Jerry
Posts: 708
Joined: 05 May 2010 15:48
Location: DysTrumpia

Re: Find Files, Contents, Grep feature

Post by Jerry » 19 Oct 2011 17:02

admin wrote:I can only offer an approach where the pattern must match at least one chunk of 1024 characters in the file.
I would be very happy enough with that.
Running on Windows 10 Pro 64-bit quad-core ASUS G752-VY notebook with 64 GB RAM, 20 or more external USB3 drives attached via 4 powered hubs, totaling 50+ TB.

Trasd
Posts: 147
Joined: 19 Oct 2011 15:45

Re: Find Files, Contents, Grep feature

Post by Trasd » 19 Oct 2011 20:57

I would like to put in a request for this feature as well - reading the "XYplorer Quick Facts," I thought this was an existing feature, one of the reasons I choose to trial XYplorer.
Trasd

"Any sufficiently advanced technology is indistinguishable from magic." A.C.C.

"I'll tell you this, no eternal reward will forgive us now for wasting the dawn." J. M.

admin
Site Admin
Posts: 46874
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Find Files, Contents, Grep feature

Post by admin » 20 Oct 2011 11:22

Trasd wrote:I would like to put in a request for this feature as well - reading the "XYplorer Quick Facts," I thought this was an existing feature, one of the reasons I choose to trial XYplorer.
Welcome to the club!

Actually I just finished adding that feature! 8)

Also cheers to Ash for kicking me.

Don

Ash
Posts: 8
Joined: 24 Nov 2009 12:40

Re: Find Files, Contents, Grep feature

Post by Ash » 21 Oct 2011 04:56

Don,

Pleased to be able to give you a friendly kick :wink:

Not sure if you sacrifice small animals at the altar of "Agile", but the agile approach would be to implement the feature as is (with the 1024 limit) just to see how popular the Regex contents search actually is.

Then, if enough people actually notice it and ask "why the 1024 limit?" you may consider more fully tackling the technical issues in the future?

Thanks for this great tool.

Ash

admin
Site Admin
Posts: 46874
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Find Files, Contents, Grep feature

Post by admin » 21 Oct 2011 10:01

Ash, have you tried the new beta and actually found yourself 1024-limited?

Trasd
Posts: 147
Joined: 19 Oct 2011 15:45

Re: Find Files, Contents, Grep feature

Post by Trasd » 21 Oct 2011 17:28

admin wrote:
Trasd wrote:I would like to put in a request for this feature as well - reading the "XYplorer Quick Facts," I thought this was an existing feature, one of the reasons I choose to trial XYplorer.
Welcome to the club!

Actually I just finished adding that feature! 8)

Also cheers to Ash for kicking me.

Don
Don, thank you. But I have not bought the program yet, I am still reviewing it (here). I will be quite frank in my comments! Are you sure you want to welcome me already (till you see what I have to say)? LOL :wink:

Actually, this program is looking great so far - nice job.


As far as the 1K limit - I don't see a problem with this. I currently use FileLocator Pro and am not looking for a replacement, but simply a quicker option when I'm in the middle of something - so I don't always have to pull out the "big guns!"

Also, BTW, can I even run the beta seeing as I don't yet have a license?
Trasd

"Any sufficiently advanced technology is indistinguishable from magic." A.C.C.

"I'll tell you this, no eternal reward will forgive us now for wasting the dawn." J. M.

Jerry
Posts: 708
Joined: 05 May 2010 15:48
Location: DysTrumpia

Re: Find Files, Contents, Grep feature

Post by Jerry » 21 Oct 2011 17:46

Ash, have you tried the new beta and actually found yourself 1024-limited?
I have been using regex routinely by default for over 21 years and I can count with less than the fingers of one hand the number of times I had to match something as large as 1024. And that was always within a perl or other script doing heavy-duty text parsing.
Running on Windows 10 Pro 64-bit quad-core ASUS G752-VY notebook with 64 GB RAM, 20 or more external USB3 drives attached via 4 powered hubs, totaling 50+ TB.

admin
Site Admin
Posts: 46874
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Find Files, Contents, Grep feature

Post by admin » 21 Oct 2011 17:56

Jerry wrote:
Ash, have you tried the new beta and actually found yourself 1024-limited?
I have been using regex routinely by default for over 21 years and I can count with less than the fingers of one hand the number of times I had to match something as large as 1024. And that was always within a perl or other script doing heavy-duty text parsing.
Also note that I can easily enlarge this value at any point to much larger values if it is really necessary. The costs are only (minor) performance costs.

j_c_hallgren
XY Blog Master
Posts: 5822
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Find Files, Contents, Grep feature

Post by j_c_hallgren » 21 Oct 2011 17:58

Trasd wrote: But I have not bought the program yet, I am still reviewing it (here). I will be quite frank in my comments! Are you sure you want to welcome me already (till you see what I have to say)? LOL :wink:
We try and welcome any new members here...I did so, right? If not, a belated welcome now...and the welcome is given unless they have as their very first post a list of a dozen+ items that they want changed (immediately of course :evil: ) and which usually are already in XY but they didn't research first.
Also, BTW, can I even run the beta seeing as I don't yet have a license?
I'm not aware of any reason you can't...the link is in the Beta thread...it wasn't there for a while but it's back.

Another outstanding feature of XY is the quick support thet you get here from the regulars and Don as Admin...sometimes answers come so quick, you're not ready for them!
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

admin
Site Admin
Posts: 46874
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Find Files, Contents, Grep feature

Post by admin » 21 Oct 2011 18:05

Trasd wrote:Also, BTW, can I even run the beta seeing as I don't yet have a license?
Yes you can. And I hope you will.

That "review project" (I'd like to call it) is fine with me. Don't hesitate to throw it into my face. All is fine as long as you end up with an enthusiastic finish! :wink:

Ash
Posts: 8
Joined: 24 Nov 2009 12:40

Re: Find Files, Contents, Grep feature

Post by Ash » 26 Oct 2011 04:32

Don,

I've just downloaded 10.5 and tried the some basic regexp contents searches and it is looking very good. Thanks for such a very quick response.

I think I may have misunderstood the 1024 character limit. I thought it was regarding size of the file to be searched. However one of the other comments here seems to be saying it is to do with the length of the search pattern. Is that correct?

Perhaps if you could give an example of where the 1024 limit could actually impact a search?

I'll play around with it a bit more to see if I can give any more useful feedback. I use Editpad Pro (another great one man product!) to do regexp searches within a single file, so it should be a good benchmark.

Regards,

Ash

admin
Site Admin
Posts: 46874
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Find Files, Contents, Grep feature

Post by admin » 26 Oct 2011 09:02

I'll give you an example with a simple wildcard pattern (I'm no good at RegExp): If your pattern is a*b then it would match "ab", "axb", "axxb", "axxxb" etc. because wildcard * means "any number of characters". In XY's content search, however, this "any number" is restricted. The whole matching string "axxx.....b" will surely be found only if it is no longer than 1024 chars. It *might* be found if it is no longer than 32,768 chars. I will not be found if it longer than 32,768 chars.

Post Reply