Search text (as text) '\\' treat as '\' (as regexp)

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Garrett
Junior Member
Junior Member
Posts: 13
Joined: 2006-11-06, 07:45 UTC

Search text (as text) '\\' treat as '\' (as regexp)

Post by *Garrett »

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"...
User avatar
AntonyD
Power Member
Power Member
Posts: 1231
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Search text (as text) '\\' treat as '\' (as regexp)

Post by *AntonyD »

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?
#146217 personal license
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Search text (as text) '\\' treat as '\' (as regexp)

Post by *petermad »

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: \\ .
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Garrett
Junior Member
Junior Member
Posts: 13
Joined: 2006-11-06, 07:45 UTC

Re: Search text (as text) '\\' treat as '\' (as regexp)

Post by *Garrett »

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: \\ .
Maybe it's better to make the special codes work only if there is a check mark on the regular expressions checkbox?
Post Reply