Regex the contents of JS memory and the DOM