View Single Post
Old 11-18-2019, 09:15 AM   #208
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,948
Karma: 6361444
Join Date: Nov 2009
Device: many
Perhaps, instead of a TrimPrefix and TrimSuffix, we instead create a "RE Renamer".
It would put up a dialog that asks for a RegularExpression and a replacement. We could use QString's QRegularExpression to modify each matching filename. It would support replacement subgroups too.

Then it could produce a list of before and after filenames side by side and have OK and CANCEL buttons.

That would give easy trimming, adding, and even re-arranging of sub capture groups.

That should be quite doable. Would this be better, or are regular expressions too hard for most users needs?

KevinH
KevinH is offline   Reply With Quote