Enhanced content search capabilities in 1.5 Alpha?

Discussion related to "Everything" 1.5.
Post Reply
PeterPanino
Posts: 90
Joined: Sun Feb 21, 2016 10:26 pm

Enhanced content search capabilities in 1.5 Alpha?

Post by PeterPanino »

I am VERY HAPPY about the new content search in 1.5 Alpha :!:

1. SameLine content indexing/search:

regex:content:"(?m)^.*word1.*word2.*word3.*word4.*$"
This matches any line starting with anything, followed by "word1", then anything (including spaces or punctuation), then "word2", and so on, ending with anything.

For Words in Any Order
If the order doesn't matter (just that all words are on the same line somewhere), use:
textregex:content:"(?m)^(?=.*word1)(?=.*word2)(?=.*word3)(?=.*word4).*$"

Will this be very slow?

2. Have you ever thought about implementing a NEAR content search? (function NEAR32 GetTheTruth: finds: function GetTheTruth)
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Enhanced content search capabilities in 1.5 Alpha?

Post by void »

Thank you for your feedback PeterPanino,


For Words in Any Order
Use:

Code: Select all

regex:content:(?m)^(?=.*word1)(?=.*word2)(?=.*word3)(?=.*word4).*$
regex: is pretty quick.

A progress bar is shown in the status bar on the right.
Double click the progress bar to cancel, or right click the progress bar -> Cancel, or change the search to cancel.


2. Have you ever thought about implementing a NEAR content search?
I will consider a near function, for now, please use regex:

Code: Select all

regex:word1.{0,32}word2
Word order is important.

Thank you for the suggestion.
PeterPanino
Posts: 90
Joined: Sun Feb 21, 2016 10:26 pm

Re: Enhanced content search capabilities in 1.5 Alpha?

Post by PeterPanino »

Hello void,

Thank you for the information!

This query finds over 1,400 files:

Code: Select all

ext:pas regex:content:formcreate.{0,100}
However, when I add the second word, I get ZERO RESULTS:

Code: Select all

ext:pas regex:content:formcreate.{0,100}begin
It seems there is an issue with the regex and line breaks?
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Enhanced content search capabilities in 1.5 Alpha?

Post by NotNull »

PeterPanino wrote: Sun Feb 15, 2026 7:07 pm It seems there is an issue with the regex and line breaks?
It is just the default behaviour.
To serach beyond line breaks, add the dot-all: search modifier:

Code: Select all

ext:pas  dotall:regex:content:formcreate.{0,100}begin

BTW:
Content searching for multiple words in any order without regex:

Code: Select all

content:<word1 word2 word3 "some phrase">
PeterPanino
Posts: 90
Joined: Sun Feb 21, 2016 10:26 pm

Re: Enhanced content search capabilities in 1.5 Alpha?

Post by PeterPanino »

Thank you very much! You helped me a lot! Soon, my new DELPHI MANAGER application, with fantastic, never-before-seen features, will be released!
Post Reply