Find Files, Contents, Grep feature

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

Find Files, Contents, Grep feature

Post by Ash »

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: 805
Joined: 05 May 2010 15:48
Location: The UnUnited States of America

Re: Find Files, Contents, Grep feature

Post by Jerry »

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, over 26 external USB3 drives attached via multiple powered hubs with letters and mount points, totaling 120+ TB.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Find Files, Contents, Grep feature

Post by admin »

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

Jerry
Posts: 805
Joined: 05 May 2010 15:48
Location: The UnUnited States of America

Re: Find Files, Contents, Grep feature

Post by Jerry »

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, over 26 external USB3 drives attached via multiple powered hubs with letters and mount points, totaling 120+ TB.

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

Re: Find Files, Contents, Grep feature

Post by Trasd »

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: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Find Files, Contents, Grep feature

Post by admin »

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 »

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: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Find Files, Contents, Grep feature

Post by admin »

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 »

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: 805
Joined: 05 May 2010 15:48
Location: The UnUnited States of America

Re: Find Files, Contents, Grep feature

Post by Jerry »

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, over 26 external USB3 drives attached via multiple powered hubs with letters and mount points, totaling 120+ TB.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Find Files, Contents, Grep feature

Post by admin »

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: 5824
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Find Files, Contents, Grep feature

Post by j_c_hallgren »

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: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Find Files, Contents, Grep feature

Post by admin »

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 »

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: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Find Files, Contents, Grep feature

Post by admin »

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