Fix the use of replace() such that it replaces all instances of the hyphen or space.