I have a webpage that I want to scrape using regex. The page may contain up to 3 text blocks that I care about.
If all three text blocks exist, then it should return a match, otherwise return no match. The text can be in any order on the page.
I tried this, but it doesn't satisfy the "any order" requirement:
re_text = (Text block 1)((.|\n)*)(Text block 2)((.|\n)*)(Text block 3)
re_compiled = re.compile(re_text)
Should I use backreferences here? Or is there another solution?