How to search for a file containing 2 known words

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
nemadeka
Junior Member
Junior Member
Posts: 86
Joined: 2009-04-26, 19:44 UTC

How to search for a file containing 2 known words

Post by *nemadeka »

I need to search for a text file which contains "summit" and "blue", but I cannot specify this in the "Find text" field, pressing F1 and reading got me nowhere, and I drowned in TC Wiki.
Sorry for asking such trivial questions.
Please, kindly hint.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

You can by checking the option RegEx (2) and type summit|blue in the find text field.
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

ts4242,
Nah, that would be OR, not AND.

nemadeka,
If
- you know the order of the words (eg. "blue" comes always after "summit") and
- the words are always on the same line
you can use the regex summit.*blue

Otherwise I would suggest first searching for "summit", then Feed to listbox, select all files, and perform a search again for "blue".

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
nemadeka
Junior Member
Junior Member
Posts: 86
Joined: 2009-04-26, 19:44 UTC

Thanks and grievances

Post by *nemadeka »

Thanks for confirming and for the tips.

I remember the time when Altavista was the best known search engine.
I could use OR, AND and NEAR switches, very helpful.

Here is a screenshot of the message finder of my e-mail client.

Image: http://i61.photobucket.com/albums/h68/nemadeka/messfind.gif

Looks good, doesn't it?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You can try to install this plugin: http://www.totalcmd.net/plugring/TextSearch.html
And then use Plugins tab of search dialog.
nemadeka
Junior Member
Junior Member
Posts: 86
Joined: 2009-04-26, 19:44 UTC

Post by *nemadeka »

Thanks!
Exactly what I need.
TimA
Junior Member
Junior Member
Posts: 24
Joined: 2008-05-20, 13:46 UTC
Location: Ottawa, Canada

Post by *TimA »

I know this is a little old, but for anyone who is looking for another solution.
- Check the "Find text" box and enter (summit.*blue|blue.*summit)
- Check the "RegEx(2) box

This will find both cases.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

TimA,
Not in the case when words are in different lines. Regex usually works with single line or very limited number of lines (not the case of TC). Hacker have mentioned this.
TimA
Junior Member
Junior Member
Posts: 24
Joined: 2008-05-20, 13:46 UTC
Location: Ottawa, Canada

Post by *TimA »

MVV - I guess I usually use the search feature in Dreamweaver which doesn't limit it to single lines...
Post Reply