I succeeded in using RegExMatch on a web page that was downloaded via URLDownloadToFile. Then I used the same needle on a haystack gotten from the same URL using:
Yeah, URLDownloadToFile can't really account for code that dynamically changes via user interaction and javascript. And iframes are tricky anyway.
But you are saying URLDownloadToFile was better in this case? Probably you didn't get the html of the iframe with your line haystack := ie.document.documentElement.outerHTML I guess the iframe won't be available via the .documentElement - you might have to go further up the DOM tree to get it.
Thank you @gregster for taking the time to share your thoughts. Those are excellent reminders to think about how the needle will be impacted by the changes in user interaction, iframe, and Javascript.