You are not logged in.
Done, DialogYesNo and WideDialogYesNo are added
Regarding custom dialogs... Bad idea, because customizable dialogs will require more type definitions for buttons, message type, etc. Also, Delphi and PascalScript do not allow variable parameters list, so your idea will not work.
Offline
THANKS!
You're quick as a lightning!
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline
I was thinking of the best way to add this functionality, and here is what I came too...
function SubMatchesRegEx(const Input, Find: WideString; const CaseSensitive: Boolean): TStringsArray;
This functions is very similar to MatchesRegEx, but instead of returning full expression matches it will return an array of sub-expression matches for the first full expression match.[...]
Many thanks for suggestion and implementation
Only now i had the need to use this and after some tests it works great.
var
NamePart: TStringsArray;begin
NamePart := SubMatchesRegEx(FileName, '(.+)( - )(.)(.+)(\..+)',False)
FileName := WideCaseCapitalize(NamePart[0]) + NamePart[1];
FileName := FileName + WideUpperCase(NamePart[2]) + WideLowerCase(NamePart[3]);
FileName := FileName + WideUpperCase(NamePart[4]);
end.
Here is the same code with explanations:
// F.ex.: from "meat loaf - bat out of hell.mp3" to "Meat Loaf - Bat out of hell.MP3"
// SubMatch RegEx's:
// NamePart[0] (.+) One or more of ANY char = meat loaf
// NamePart[1] ( - ) BlankDashBlank = -
// NamePart[2] (.) One piece of ANY char = b
// NamePart[3] (.+) One or more of ANY char = at out of hell
// NamePart[4] (\..+) dot itself and One or more of ANY char = .mp3
var
NamePart: TStringsArray;
begin
//SubMatchesRegEx(const Input, Find: WideString; const CaseSensitive: Boolean): TStringsArray;
NamePart := SubMatchesRegEx(FileName, '(.+)( - )(.)(.+)(\..+)',False)
//ShowMessage('Debug: #'+NamePart[0]+'#'+NamePart[1]+'#'+NamePart[2]+'#'+NamePart[3]+'#'+NamePart[4]+'#');
FileName := WideCaseCapitalize(NamePart[0]) + NamePart[1];
FileName := FileName + WideUpperCase(NamePart[2]) + WideLowerCase(NamePart[3]);
FileName := FileName + WideUpperCase(NamePart[4]);
end.
THX :thumpsup:
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
Hi, Stefan!
You might be interested in a bit more general script for changing case of regex's capturing groups.
I've written it thanks to the SubMatchesRegEx function.
You may find it here.
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline