You should use String.format instead of replace here