Find in files, find in viewer doesn't work

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
mikcz
Junior Member
Junior Member
Posts: 8
Joined: 2013-03-26, 07:40 UTC

Find in files, find in viewer doesn't work

Post by *mikcz »

Repro steps A:
1. Create ansi file 'file.txt' with content:
g:\branches\trunk\bin\script.bat
2. Search for any file with content:
g:\branches\trunk

Expected results: File should be found
Actual result: No files found

Repro steps B:
1. Create ansi file 'file.txt' with content:
g:\branches\trunk\bin\script.bat
2. Open this file with viewer
3. Ctrl+F and enter:
g:\branches\trunk

Expected results: Text should be found
Actual result: Not found: window appears


Version: 8.51a x64
User avatar
Gral
Power Member
Power Member
Posts: 1609
Joined: 2005-01-26, 15:12 UTC

Post by *Gral »

TC treats "\t" as "Tab" (0x09) in this case (also "\n" as a line break).
Use "\\t" instead.

From help:

Code: Select all

Find text 
If this option is checked, you can enter text to be searched. With \t you find tabstops, and with \n line breaks (ENTER) in texts. To find a backslash \, you need to give it twice: \\ .
User avatar
Dalai
Power Member
Power Member
Posts: 10036
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

No bug, but intended and documented behaviour:
TC help, Find files wrote:Find text
If this option is checked, you can enter text to be searched. With \t you find tabstops, and with \n line breaks (ENTER) in texts. To find a backslash \, you need to give it twice: \\ .
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
mikcz
Junior Member
Junior Member
Posts: 8
Joined: 2013-03-26, 07:40 UTC

Post by *mikcz »

A good example how to solve the issue is Notepad++. There is 'normal' search - plain text, extended - with \n \t \r etc, and regexp.

As an 'average user' I expect plain text search, since I'm not searching for anything that contains '\\t' but '\t'. Current behavior is counter intuitive. Where can I find information what pairs will not work as expected (or only \t and \n are supported, which would be few)?
User avatar
Dalai
Power Member
Power Member
Posts: 10036
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

You don't have to worry about \t or \n, just double the backslashes.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
mikcz
Junior Member
Junior Member
Posts: 8
Joined: 2013-03-26, 07:40 UTC

Post by *mikcz »

And yes, I've read help - mentions only '\\', '\t', '\n' :)
mikcz
Junior Member
Junior Member
Posts: 8
Joined: 2013-03-26, 07:40 UTC

Post by *mikcz »

I don't want to change searched text. I've used Notepad++ instead since it's configurable. Still I would like TC to be the top tool.

Anyway, thanks for the answers.
User avatar
Dalai
Power Member
Power Member
Posts: 10036
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

I agree that this is not quite intuitive and could be done in a better way, e.g. an additional checkbox "Literal search" would do where \, \t and \n are treated as normal text.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

[mod]Moved to the English forum.

Hacker (Moderator)[/mod]
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.
Post Reply