[TC11.51 RC3] Can not find text in files with Linux line returns

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
andry81
Member
Member
Posts: 118
Joined: 2018-11-22, 19:17 UTC

[TC11.51 RC3] Can not find text in files with Linux line returns

Post by *andry81 »

Working file example:

File: 1.txt
123\r\n
Attempt to find:
Search for: *empty*
Find text: 123\n
NOT working example:

File: 1.txt
123\n
Attempts to find:
Search for: *empty*
Find text: 123\n
Search for: *empty*
Find text: 123\r
Both does not work. Seems the `\n` in the `Find text` corresponds to the Windows line return character sequence - `\r\n`.

Is there a way to search `\n` in a file text as a raw character instead of character sequence?
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC11.51 RC3] Can not find text in files with Linux line returns

Post by *white »

andry81 wrote: 2025-02-03, 01:53 UTC Is there a way to search `\n` in a file text as a raw character instead of character sequence?
Search for the hex sequence:
"123" 0A
PascalT
Junior Member
Junior Member
Posts: 34
Joined: 2015-08-27, 08:00 UTC

Re: [TC11.51 RC3] Can not find text in files with Linux line returns

Post by *PascalT »

Just noticed that searching for \x0d or \x0a in regex do not work either.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50383
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC11.51 RC3] Can not find text in files with Linux line returns

Post by *ghisler(Author) »

Sorry, \n only finds Windows line breaks. Currently there are no plans to change this.
Just noticed that searching for \x0d or \x0a in regex do not work either.
Regular expression search only works within lines. Multiple lines cannot be found. This is briefly explained on the regular expressions page in the help:
The other modificators are not relevant for Total Commander, because the program only supports searching within one line.

Moderator message from: ghisler(Author) » 2025-02-05, 07:55 UTC

Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
Post Reply