[TC10.50b3] Regex replace: Numbered group reference defaults to "$"

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
white
Power Member
Power Member
Posts: 4619
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

[TC10.50b3] Regex replace: Numbered group reference defaults to "$"

Post by *white »

Select a file named "abc" and start the Multi-Rename Tool. Then do the following search and replace:

Code: Select all

Search for:    (b)
Replace with:  $2
RegEx:         Enabled

Result:        a$c
Expected:      ac
TC 9.51 works fine, bug introduced in TC version 10.00.

It's a bug in the regex library. I have reported it and a fix has been made. See:
https://github.com/andgineer/TRegExpr/issues/268
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC10.50b3] Regex replace: Numbered group reference defaults to "$"

Post by *ghisler(Author) »

Thanks, their fix seems to work for me. I will include it in beta 4.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4619
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC10.50b3] Regex replace: Numbered group reference defaults to "$"

Post by *white »

Tested OK using TC10.50b4 32bit and 64bit.

(The fix for TRegExpr has been merged with master branche and a new release has been created. You already have the latest sources, so you don't have to do anything.)
User avatar
white
Power Member
Power Member
Posts: 4619
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC10.50b3] Regex replace: Numbered group reference defaults to "$"

Post by *white »

Moderator message from: white » 2022-05-04, 20:21 UTC

Moved to Fixed bugs
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC10.50b3] Regex replace: Numbered group reference defaults to "$"

Post by *ghisler(Author) »

The fix for TRegExpr has been merged with master branche and a new release has been created.
Indeed I saw this just today before the release can compared the new master branch with my code to be sure that I didn't miss any changes.
Author of Total Commander
https://www.ghisler.com
Post Reply