Multi-Rename RegEx problems?

English support forum

Moderators: Stefan2, white, sheep, Hacker

Post Reply
bobbozzo
Junior Member
Junior Member
Posts: 11
Joined: 2011-01-19, 07:45 UTC

Multi-Rename RegEx problems?

Post by *bobbozzo » 2019-08-13, 05:36 UTC

Hi,
In 9.21a and 9.22a (64-bit), I'm having trouble with RegEx in the Multi-Rename tool... trying to append or prepend a string to the filename doesn't seem to be working like it used to...
for a file named 12345678.jpg
Search for: ($1)
Replace with: AAAA - $1 - BBBB
Extension UNChecked

should result in
AAAA - 12345678 - BBBB.jpg
but instead gets
AAAA - 12345678 - BBBBAAAA - - BBBB.jpg

I'll try to upload a screenshot.

Thanks


User avatar
Stefan2
Power Member
Power Member
Posts: 2551
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Multi-Rename RegEx problems?

Post by *Stefan2 » 2019-08-13, 07:51 UTC

bobbozzo wrote:
2019-08-13, 05:36 UTC
Hi,
In 9.21a and 9.22a (64-bit), I'm having trouble with RegEx in the Multi-Rename tool... trying to append or prepend a string to the filename doesn't seem to be working like it used to...
for a file named 12345678.jpg
Search for: ($1)
Replace with: AAAA - $1 - BBBB
Extension UNChecked

should result in
AAAA - 12345678 - BBBB.jpg
but instead gets
AAAA - 12345678 - BBBBAAAA - - BBBB.jpg

I'll try to upload a screenshot.

Thanks

>>> Search for: ($1)
That $1 is a regex-marker for the replacement box
for to reuse what was captured in the Search by the first capturing group (...)

So adjust your search and tell the regex engine what you are looking for between your capturing parenthesis (...)
Your replacement looks fine, however.



Need any more help? ...



 
Inofficial FAQs || WIKI (Deu/Eng) || TC Home (What's new? // FAQ // Download // Order // Addons // Tools // Plugins)
Erst wenn der letzte Baum gefällt oder die letzte Biene verendet ist, werden die Leute verstehen warum Umweltschutz wichtig ist.

User avatar
Dalai
Power Member
Power Member
Posts: 6625
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Multi-Rename RegEx problems?

Post by *Dalai » 2019-08-13, 14:18 UTC

Uh, to enclose a filename (i.e. to prepend and append something) RegEx is not needed at all. Just use the Rename mask box and add your additional strings there, before the [N] and after it.

However, I can confirm the issue itself, even in TC 8.52a. I don't know why it occurs, but it can be solved by ticking [X] Subst checkbox.

Regards
Dalai
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups

bobbozzo
Junior Member
Junior Member
Posts: 11
Joined: 2011-01-19, 07:45 UTC

Re: Multi-Rename RegEx problems?

Post by *bobbozzo » 2019-08-17, 20:03 UTC

Stefan2 wrote:
2019-08-13, 07:51 UTC
>>> Search for: ($1)
That $1 is a regex-marker for the replacement box
for to reuse what was captured in the Search by the first capturing group (...)
Sorry, you're right, I was doing it completely wrong!

This bug report can be closed.

thanks!

Post Reply