Lister: Search for "\t" always operates in RegEx-M
Moderators: Hacker, petermad, Stefan2, white
Hmmm. Thanks. So, i guess that in order to search for the string "\\" (2 backslashes), one would actually have to enter \\\\ (4 backslashes). Funny though, 3 backslashes also finds \\ in a file! Anyway...
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
Find text containing backslash in a file content = 0 results
Steps to reproduce:
1) Create a txt (bat etc.) file in a directory. The text will contain "\", for example \test.
2) Press Alt+F7, fill a search phrase "\test" in the "find text" field and start the search; all the search options are default (Ansi win/dos, utf 8/16 ON).
3) No results will be found.
Additional testing:
Change the file content to
a) \test no results
b) test\ ok
c) te\st ok
d) c\test no result
e) c:\test no result
f) ccc\test no result
Please, fix the bug ASAP, it is very serious for me.
Thanks
1) Create a txt (bat etc.) file in a directory. The text will contain "\", for example \test.
2) Press Alt+F7, fill a search phrase "\test" in the "find text" field and start the search; all the search options are default (Ansi win/dos, utf 8/16 ON).
3) No results will be found.
Additional testing:
Change the file content to
a) \test no results
b) test\ ok
c) te\st ok
d) c\test no result
e) c:\test no result
f) ccc\test no result
Please, fix the bug ASAP, it is very serious for me.
Thanks
Last edited by redfox on 2017-05-14, 13:41 UTC, edited 1 time in total.
Next time let out the ASAP
and take the time to read more from the help !
The \t has to be escaped as it stands for a tab.
So you have to search for \\test
and take the time to read more from the help !
The \t has to be escaped as it stands for a tab.
So you have to search for \\test
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
RegardsTC help 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: \\ .
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
There should be an option at least in the wincmd.ini to enable text searching in a standard way, without automatically resolving backslash as a part of a possible escape sequence.
This one, i.e. the need of typing it twice, is really uncomfortable. Most people want to search for a phrase containing one or more backslash characters - especially in a source code / file paths. On the other side, finding a tab (\t) or a newline (\n) sequence in a file is a rare case, I personally never needed it.
Sorry for the "ASAP".
This one, i.e. the need of typing it twice, is really uncomfortable. Most people want to search for a phrase containing one or more backslash characters - especially in a source code / file paths. On the other side, finding a tab (\t) or a newline (\n) sequence in a file is a rare case, I personally never needed it.
Sorry for the "ASAP".
Last edited by redfox on 2017-05-14, 13:47 UTC, edited 3 times in total.
Search text (as text) '\\' treat as '\' (as regexp)
TC 10.52
1. Create text file with string "033\\^\033".
2. try find text "033\\^\033" in viewer or by Alt-F7 in current dir (both without regexp) - no result.
TC treat \\ as \ and search "033\\^\033" as "033\^\033"...
1. Create text file with string "033\\^\033".
2. try find text "033\\^\033" in viewer or by Alt-F7 in current dir (both without regexp) - no result.
TC treat \\ as \ and search "033\\^\033" as "033\^\033"...
Re: Search text (as text) '\\' treat as '\' (as regexp)
2Garrett
so use this:
033\\\^\\033
Or you want to understand - why in principle TC treat \\ as \? even if we do not tick checkmark for RegExp?
so use this:
033\\\^\\033
Or you want to understand - why in principle TC treat \\ as \? even if we do not tick checkmark for RegExp?
#146217 personal license
Re: Search text (as text) '\\' treat as '\' (as regexp)
2Garrett
This is not a bug, it is a feature:
This is not a bug, it is a feature:
Help 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: \\ .
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Search text (as text) '\\' treat as '\' (as regexp)
Maybe it's better to make the special codes work only if there is a check mark on the regular expressions checkbox?petermad wrote: 2023-03-31, 11:11 UTC 2Garrett
This is not a bug, it is a feature:
Help 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: \\ .
Search for \t in Lister
Windows 11 current, TC 11.50b5, 64-bit (same behaviour in 11.03 with deleted [Lister] section)
Create a file with a string containing \t, for example
Search for \t fails.
All checkboxes unticked, so this is not a regular expression or wrong case.
Create a file with a string containing \t, for example
Code: Select all
whatever\tmore
All checkboxes unticked, so this is not a regular expression or wrong case.
Re: Search for \t in Lister
\t searches for a tab, regardless of the regex setting.
Try \\t
And next time, please don't make error reports before checking the help and the forum.
Try \\t
And next time, please don't make error reports before checking the help and the forum.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Search for \t in Lister
2Horst.Epp
It's OK, better too many reports than no reports.
It's OK, better too many reports than no reports.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Search for \t in Lister
Agreed, but why not asking first in the normal English forum.ghisler(Author) wrote: 2024-11-12, 08:31 UTC 2Horst.Epp
It's OK, better too many reports than no reports.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64