Character replacement help

I want to be able to replace certain characters in my file names, but can’t seem to manage it by following the scripting documentation and threads on this forum.

Eg. in the tag a title looks like this:

Nabucco: Va, pensiero, “Chorus of Hebrew Slaves”

But the file is named like this:

01 - Nabucco_ Va, pensiero, _Chorus of Hebrew Slaves_

And I want it to be named like this:

01 - Nabucco - Va, pensiero, ‘Chorus of Hebrew Slaves’

I tried adding the following to the Scripting window, but it doesn’t do anything:

$set(title,$replace(%title%,: , - ))
$set(title,$replace(%title%,",'))