I just realised why it didn't work for me;
I assumed the replace method for a string actually modified the string which it does not. It simply returns the modified string.
I assumed the replace method for a string actually modified the string which it does not. It simply returns the modified string.