Would it be simpler to use String.replace() rather than regexes?