Rough String Trimming

If you need help on how to use the program
Post Reply
Torben
Posts: 2
Joined: 2019-01-09 21:19:44

Rough String Trimming

Post by Torben »

Hi!
First, thank you for this very helpful software.

Here my problem:
I want to trim a file name very strong.
For example:
Dmitri Gluchowski - Metro 2033.rar
Result: DG-M2033.rar
Or another example:
Adam Nevill - Im tiefen Wald.rar
Result: AN-ItW.rar

In other words trim every white space and shorten every word to one single letter, but leaving numbers alone.

Is this somehow possible?

Thanks
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Rough String Trimming

Post by antp »

Hi,
If possible, it would be with Regular Expressions.
I don't know these expressions enough to provide a definitive answer (even if I use them often) - there may be a way but I'm not sure how.
Torben
Posts: 2
Joined: 2019-01-09 21:19:44

Re: Rough String Trimming

Post by Torben »

Maybe i have th re-think the problem.
Another way could be, that i use the change case process and make every word starting with upper case. And then trim every lower case and white space.
For example:
Das Ist Ein Test - Test 2000.part1.rar
Resulting:
DIET-T2000.part1.rar

My problem is, that i really don't understand how this regex stuff works.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Rough String Trimming

Post by antp »

That will work if you use the regex
[a-z\s]
replaced by an empty string as new name template
However it will also strip the extension if it is itself in lowercase; so maybe first put the extension in uppercase (including "partN" of the rar)
Post Reply