Changed back to replace method without reg-exps.