Newbie question (searching for two names in a file/dirname)
Moderators: Hacker, petermad, Stefan2, white
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
In a single search pass, I don't believe you can.
Even the editors that I know of don't do multi-line regex for in file-text. Nor do the linux tools for the most part, they are single-line searches.
So the only way that I can think of, would be search for Britney, Feed to ListBox
Search for Spears, (in the files of the Result ListBox)
2 Passes.
Even the editors that I know of don't do multi-line regex for in file-text. Nor do the linux tools for the most part, they are single-line searches.
So the only way that I can think of, would be search for Britney, Feed to ListBox
Search for Spears, (in the files of the Result ListBox)
2 Passes.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
- GammelBert
- Member
- Posts: 109
- Joined: 2007-02-21, 18:42 UTC
- Location: Germany
- GammelBert
- Member
- Posts: 109
- Joined: 2007-02-21, 18:42 UTC
- Location: Germany
Well, Balderstrom was right, most editors divide files by lines and allow to do regex search only inside of lines.
So you can't find text with e.g. both words Britney and Spears (yes, she did it again
) anywhere in file using text editor too.
But maybe you can use some content plugins like TextSearch (however it may be slower).
So you can't find text with e.g. both words Britney and Spears (yes, she did it again

But maybe you can use some content plugins like TextSearch (however it may be slower).
Xplorer2 has this feature...
zabkat website ... xplorer² Quick Start Guide
ADVANCED: Boolean text searches
You can search for multiple text strings and also assign a boolean connotation to each substring. To achieve the former you just separate the expressions you are after with commas, e.g. hello , world will mark as positive hits files that contain either hello or world (or both). You can add a boolean effect using the special characters + for AND and — for NOT, at the beginning of each expression. E.g. searching for help, +me, —god will mark files that must contain "me", maybe contain "help" and not contain "god".
search filter for you
+Britney,+Spears
zabkat website ... xplorer² Quick Start Guide
ADVANCED: Boolean text searches
You can search for multiple text strings and also assign a boolean connotation to each substring. To achieve the former you just separate the expressions you are after with commas, e.g. hello , world will mark as positive hits files that contain either hello or world (or both). You can add a boolean effect using the special characters + for AND and — for NOT, at the beginning of each expression. E.g. searching for help, +me, —god will mark files that must contain "me", maybe contain "help" and not contain "god".
search filter for you
+Britney,+Spears
Last edited by mi1400 on 2010-10-16, 15:41 UTC, edited 1 time in total.
also play with...
+ Britney,+ Spears
+Britney, +Spears
they behave differently...
zabkat website ... xplorer² Quick Start Guide
(You shouldn't use spaces after the + or — characters, unless you want to match a string that starts with spaces.)
The down-side of this flexibility is that if you want to search e.g. for commas verbatim, you have to either enter them as special codes (conveniently included in the Special characters drop-down box) or check the Verbatim checkbox to disallow multistring use. Also note you cannot combine boolean searches with regular expressions — you'll have to use the constructs in Table 1 for equivanent boolean functionality.
+ Britney,+ Spears
+Britney, +Spears
they behave differently...
zabkat website ... xplorer² Quick Start Guide
(You shouldn't use spaces after the + or — characters, unless you want to match a string that starts with spaces.)
The down-side of this flexibility is that if you want to search e.g. for commas verbatim, you have to either enter them as special codes (conveniently included in the Special characters drop-down box) or check the Verbatim checkbox to disallow multistring use. Also note you cannot combine boolean searches with regular expressions — you'll have to use the constructs in Table 1 for equivanent boolean functionality.
Find Files with word1 AND word2
Click on Plugins tab. Check "search in plugin" and "and."
plugin = tc, property=fullname, operator=contains, Value=word1
plugin = tc, property=fullname, operator=contains, Value=word2
plugin = tc, property=fullname, operator=contains, Value=word1
plugin = tc, property=fullname, operator=contains, Value=word2
Tick
Nice find, nn1
Now to fix
..the failure of syntax flexibility when you add a |folder\ in the For field
..and lack of the same foldername blank-space flexibility in say, sub folder, as there is in filenames.
But that's for somewhere else..
Now to fix
..the failure of syntax flexibility when you add a |folder\ in the For field
..and lack of the same foldername blank-space flexibility in say, sub folder, as there is in filenames.
But that's for somewhere else..