I need to remove spaces from disk numbers

Advanced Renamer forum
#1 : 12/04-17 15:03
Ronn
Ronn
Posts: 1
I am looking to remove the space from a disk number (ie. abc123 - 6) however the file name does have to maintain spaces in the Track and artist info
so old file is:
abc123 - 06 - Jimmy Singer - Song1.mp3

new name should be:
abc123-06 - Jimmy Singer - Song1.mp3

Any ideas how I can use regular expressions for this?
I tried using REPLACE: (\d) - (\d)
WITH: (\d)-(\d)
reg exp: tick

but i keep getting this:
old: abc123 - 06 - Jimmy Singer - Song1.mp3
new: abc12\d-\d6 - Jimmy Singer - Song1.mp3

thanks in advance


12/04-17 15:03 - edited 12/04-17 15:55
#2 : 12/04-17 18:34
G. Lambany
G. Lambany
Posts: 187
Reply to #1:
text to be replaced Replace: (^.+?)\s?\-\s?(.+)
Replace with: \1-\2

this expression should work with those variants:

abc123 - 06 - Jimmy Singer - Song1.mp3
abc123- 06 - Jimmy Singer - Song1.mp3
abc123 -06 - Jimmy Singer - Song1.mp3

and keep the final format

cheers


12/04-17 18:34