var today = “2018-12-25”;var reg = new RegExp( ‘-’ , “g” )var newstr = today.replace( reg , ‘/’ );