Cannot find recent KRename Manual

KRename is a superb application, but I fail to comprehend the File and Replace feature when it comes to Regular Expressions and processing tokens in replace strings.

The last decent Manual I found is for version 3.0.12. Is there any newer version of Manual?

If not, can someone instruct me where to find at least examples of “Find is a Regular Expression” and “Process tokens in replace strings”?

Thanks,
Andrej

The current documentation seems to be here, but it’s quite terse and does not cover the Find and Replace feature. Your link is not working for me.

Having just looked into this myself, I found that KRename uses the QRegExp library, so that documentation will help you on constructing regex strings, and the syntax is mostly similar to that you will find in any guide on Perl Compatible Regular Expressions (PCRE).

One detail that wasn’t very clear to me from the QRegExp docs and other resources is the syntax for the replacement string “tokens”–while some PCRE style tools use $1 to reference the first match group, KRename uses \1.

To use tokens, you just need to define match groups in your regex string by enclosing them in parentheses. Here’s a simple example using the “Find is a Regular Expression” and “Process tokens in replace strings” options:

original filename: mycoolfile22.jpg

find: ^(\D*)(\d*)$

replace: \1-final

renamed file: mycoolfile-final.jpg

2 Likes

Thank you for a comprehensive answer! I will find my way from here.

Link to the manual is now really dead, but if you search for file name of this manual (krename-3.0.12.pdf) there are still some available, for instance this..