The famous Stack Overflow answer
If you ask Stack Overflow how to parse HTML with regex, you'll get a famous unhinged-but-correct answer that ends with the line "He comes." The lesson it's teaching is real: regex is not a parser.
What regex genuinely cannot do
Nested structures. Matching balanced parentheses to arbitrary depth is not a regular language. ((a)) vs (((a))) requires counting, and pure regex can't count. Some PCRE engines added recursion ((?R)) to fake it, but you've left the regex theory behind.
HTML / XML / Markdown / JSON / YAML / source code. All of these have nested structure. Use a parser. Python has html.parser, lxml, json, yaml. JavaScript has DOMParser, JSON.parse. Every language has a real parser for every real format.
Semantic validation. Regex can check shape, not meaning. \d{4} matches "9999" — but is 9999 a valid year? You need code for that.
Anything Unicode-deep. Right-to-left scripts, emoji ZWJ sequences, combining characters, locale-specific casing. Regex *can* touch this with \p{...} and Unicode flags, but it's almost always the wrong tool.
The smell test
If your pattern is over 100 characters, has more than 4 nested groups, or you're using lookbehind to fake context tracking — stop. You're trying to parse, not match. Reach for the right tool: an HTML parser, a YAML library, a hand-written tokenizer, an AST walker.
Regex is shape detection. The moment your problem becomes structural, hand it off.