I need to replace _xxx at the end of any audio format with nothing [every _ sign stands in this post for mine for a pause, because this forum will does not allow to show multiple pauses]
So for example
Title Of Song xxx.flac
becomes
Title Of Song .flac
but
Title Of Songxxx.flac
stays as
Title Of Songxxx.flac
[i.e. lack of pause acting a fail-safe]
And also
Title Of Song 2__xx.mp3 Title Of Song 2___XXX.mp3
become
Title Of Song 2__.mp3 Title Of Song 2___.mp3
but
Title Of Song 2xx.mp3 Title Of Song 2XXXX.mp3
stay as
Title Of Song 2xx.mp3 Title Of Song 2XXXX.mp3
So how do I do this?
I think I should also have precised, that it should work for any titles / filenames, and not just literally for Title Of Song
Modifying this Format Value to
`$regexp(' xxx',(.*)\s+xxx,$1)
makes the whole _FILENAME disappear, leaving only the extension; even when there is no xxx present at all in it
This makes no sense at all if you want to modify the filename - as this look in the string " xxx" for at least 1 space character and "xxx" which produces an empty string in (.*) and therefore deletes the filename.
So, please, instead of the string constant in your examples (and my reply) use the property variable %_filename%.