Javascript Regular Expression (RegExp) Multiline Flag Not Universal