import java.util.*;
import java.lang.*;
class Main
{
{
String myString
= "this filename.has[characters')which/should%be@replaced.txt"; myString = myString.replaceAll("[^a-zA-Z0-9.-]", "_");
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewogICAgICAgIFN0cmluZyBteVN0cmluZyA9ICJ0aGlzIGZpbGVuYW1lLmhhc1tjaGFyYWN0ZXJzJyl3aGljaC9zaG91bGQlYmVAcmVwbGFjZWQudHh0IjsKCQlteVN0cmluZyA9IG15U3RyaW5nLnJlcGxhY2VBbGwoIlteYS16QS1aMC05Li1dIiwgIl8iKTsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4obXlTdHJpbmcpOwoJfQp9