File rename using regex

hello, please assist in renaming my mp3 file names.

for the below filename
14. Cant Believe It Feat. Lil Wayne - The Usual Suspects, T-Pain & Akon.mp3

i would like to change it to
Cant Believe It Feat. Lil Wayne - The Usual Suspects, T-Pain & Akon.mp3

i am trying to use this ^\s*\d+.?\s*-\s* but its not working.

Also please provide me a regex for removing one or more "." dots from the filename without affecting the file type.

Any help would be highly appreciated.

Why not "Replace with regular expression" for _FILENAME
Search string: ^\d+.\s
Replace:
(leave empty)

:rolleyes:

thanks a lot. would you please tell me why ^\s*\d+.?\s*-\s* didnt work for that file name. I am a newbie to regex so could you please tell me where i went wrong.

Formatstring: $trimLeft(%_filename%,'0123456789. ') ... or ... Formatstring: $regexp(%_filename%,'^[\d\s.]*',) From: '14. Cant Believe It Feat. Lil Wayne - The Usual Suspects, T-Pain & Akon.mp3' To : 'Cant Believe It Feat. Lil Wayne - The Usual Suspects, T-Pain & Akon.mp3'

DD.20151221.1839.CET

Convert "Tag - Tag" ... or ... Action "Format value" Field: _FILENAME Formatstring: $replace(%_filename%,'.',) From: '... and then there were three ... .mp3' To : ' and then there were three .mp3' ... or ... Convert "Tag - Tag" ... or ... Action "Format value" Field: _FILENAME Formatstring: $trim($replace(%_filename%,'.',)) From: '... and then there were three ... .mp3' To : 'and then there were three.mp3' ... or ... Convert "Tag - Tag" ... or ... Action "Format value" Field: _FILENAME Formatstring: $regexp(%_filename%,'^[\s.]|[\s.]$',) From: '... and then there were three ... .mp3' To : 'and then there were three.mp3' ... or ... Convert "Tag - Tag" ... or ... Action "Format value" Field: _FILENAME Formatstring: $regexp(%_filename%,'^[\s.]*|[\s.]*$|\s*\.',) From: '... and ... then ... there were three ... .mp3' To : 'and then there were three.mp3'

DD.20151221.1911.CET

thanks a lot DetlevD . i have read many of your posts and it has been very useful.
Again if its not too much could you please tell me what is wrong wth the regex ^\s*\d+.?\s*-\s*
which i am planning to use for removing the spaces,numbers and hyphen in a filename.

In ^\s*\d+.?\s*-\s*
you only used the repetition indicator * bu left out what should be repeated.
Something like
^\s*\d+.?\s.-\s.
may work ...

Still: why do you mess around with the filenames if they could be rewritten much easier with the Convert>Tag-Filename function? You do not have to shift around the character positions in unstructured string data as you use structured data from the tag fields to create the string.

oh thanks i didnt know that. Much appreciated.

Have a look at this example ...
and check out whether your filenames fit to the regexp or not ...
or otherwise why the regexp does not fit to your filenames ...

Convert "Tag - Tag" ... or ... Action "Format value" Field: _FILENAME Formatstring: $regexp(%_filename%,'^\s*\d+\.?\s*-\s*',) Possible filenames, which should be affected by this regexp ... '3-test.mp3' '3 - test.mp3' '3 - test.mp3' '3.-test.mp3' '3. - test.mp3' '3. - test.mp3' '13-test.mp3' '13 - test.mp3' '13 - test.mp3' '13.-test.mp3' '13. - test.mp3' '13. - test.mp3' '3-test.mp3' ' 3 - test.mp3' ' 3 - test.mp3' ' 3.-test.mp3' ' 3. - test.mp3' ' 3. - test.mp3' '13-test.mp3' ' 13 - test.mp3' ' 13 - test.mp3' '13.-test.mp3' ' 13. - test.mp3' ' 13. - test.mp3' Result filename is always ... 'test.mp3' This filename does not match ... '13. ;-) test.mp3'

DD.20151221.2002.CET