Newbie question (searching for two names in a file/dirname)

English support forum

Moderators: Hacker, petermad, Stefan2, white

User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

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.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
GammelBert
Member
Member
Posts: 109
Joined: 2007-02-21, 18:42 UTC
Location: Germany

Post by *GammelBert »

I didn't expect TC to have a single-line limitation. This should be documented in the help file.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

GammelBert wrote:I didn't expect TC to have a single-line limitation. This should be documented in the help file.
Where you didn't expect such limitation? And where it has place in TC? :shock:
User avatar
GammelBert
Member
Member
Posts: 109
Joined: 2007-02-21, 18:42 UTC
Location: Germany

Post by *GammelBert »

I meant that the regex search for in file-text is limited to single lines as Balderstrom stated above.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

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 :D) anywhere in file using text editor too.

But maybe you can use some content plugins like TextSearch (however it may be slower).
mi1400
Junior Member
Junior Member
Posts: 2
Joined: 2010-10-16, 14:49 UTC

Post by *mi1400 »

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
Last edited by mi1400 on 2010-10-16, 15:41 UTC, edited 1 time in total.
mi1400
Junior Member
Junior Member
Posts: 2
Joined: 2010-10-16, 14:49 UTC

Post by *mi1400 »

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.
User avatar
nn1k3
Member
Member
Posts: 141
Joined: 2007-02-06, 16:59 UTC

Find Files with word1 AND word2

Post by *nn1k3 »

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
Phred
Senior Member
Senior Member
Posts: 382
Joined: 2009-06-16, 15:24 UTC
Location: SEAu

Tick

Post by *Phred »

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..
Post Reply