[TC10.50b3/TC11.x] Error with parameters for name register in MRT

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
sa16
Senior Member
Senior Member
Posts: 215
Joined: 2021-09-10, 07:15 UTC

[TC10.50b3/TC11.x] Error with parameters for name register in MRT

Post by *sa16 »

Help wrote:Regular expressions --> Subexpressions for search+replace
In "Replace by", use parameters \U, \L, \F, \n to convert from this point on to uppercase, lowercase, first char in word uppercase, and back to unchanged, e.g.
Search for: (.*) - (.*)\.mp3
Replace by: \U$2 - \L$1.mp3
Parameter \F does not work starting with TC 10.50b3.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC10.50b3/TC11.x] Error with parameters for name register in MRT

Post by *ghisler(Author) »

Confirmed, it's a bug of the used regular expression library, which I updated with TC 10.50b3.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC10.50b3/TC11.x] Error with parameters for name register in MRT

Post by *ghisler(Author) »

It seems that the updated version of the library does not support\F. According to the documentation here:
https://wiki.freepascal.org/Regexpr
it only supports these:
\l - First char to lower
\L - All chars to lower
\u - First char to upper
\U - All chars to upper

In the old library, \U, \L, \F, \n were parameters I added myself:
06.08.17 Added: Multi-rename tool, regular expressions: In "Replace with", support parameters \U, \L, \F, \n to convert from this point on to uppercase, lowercase, first char in word uppercase, and back to unchanged (32/64)

I will check whether I can somehow re-add \F and \n, but it could be difficult now that the library supports the above mentioned parameters.
Author of Total Commander
https://www.ghisler.com
sa16
Senior Member
Senior Member
Posts: 215
Joined: 2021-09-10, 07:15 UTC

Re: [TC10.50b3/TC11.x] Error with parameters for name register in MRT

Post by *sa16 »

History.txt wrote:31.05.23 Fixed: Multi-rename tool, regular expressions: The parameter \F in the "Replace with" field didn't work any more.
Fixed in TC 11.00b5. Thanks!
Unfortunately, the fix did not affect the situation with the Russian file names in the TCx32: the \U ,\L and \F parameters still do not work (starting from 10.50b3x32). In TCx64, everything is fine.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC10.50b3/TC11.x] Error with parameters for name register in MRT

Post by *ghisler(Author) »

Thanks for confirming the fix! I added the \F parameter myself.
I can confirm that only English characters work - I will add Unicode support.
Author of Total Commander
https://www.ghisler.com
sa16
Senior Member
Senior Member
Posts: 215
Joined: 2021-09-10, 07:15 UTC

Re: [TC10.50b3/TC11.x] Error with parameters for name register in MRT

Post by *sa16 »

ghisler(Author) wrote:I will add Unicode support.
Good!
sa16
Senior Member
Senior Member
Posts: 215
Joined: 2021-09-10, 07:15 UTC

Re: [TC10.50b3/TC11.x] Error with parameters for name register in MRT

Post by *sa16 »

History.txt wrote:01.06.23 Fixed: Multi-rename tool, regular expressions: The parameters \L, \U and \F in the "Replace with" field didn't support accented characters (32)
Confirmed fixed in TC 11.00b6. Thanks!
Post Reply