Improve regexes for migration of document.write to mw.loader.load