split name

Advanced Renamer forum
#1 : 27/02-16 09:29
George
George
Posts: 2
I don't know if it's possible but I can't find how to split names. I have abc156, abc182, abc199 and I want to separate it with " - " ex. abc-156, abc-182


27/02-16 09:29
#2 : 28/02-16 12:43
Tester123
Tester123
Posts: 92
Reply to #1:
If your files follow this pattern <some non-digit characters><some digit characters>, then you can use this Replace Method:

Text to be replaced: ([^\d]+)(\d+)
Replace with: \1-\2
Use regular expressions: Tick

Summary:
Define two groups (signified by parentheses).
For group 1, look for at least one non-digit '[^\d+]' character (where ^=not, \d=digit, and +="one or more").
For group 2, look for at least one digit '\d+'.
The replace with what was found in group 1 '\1' and group 2 '\2' and separate with a hyphen.


28/02-16 12:43 - edited 28/02-16 12:45
#3 : 04/03-16 08:01
George
George
Posts: 2
Reply to #2:
That's great thxs


04/03-16 08:01