Task: Demonstrate Why Regex Fails to Parse XML/HTML
Task: Demonstrate Why Regex Fails to Parse XML/HTML: a task in Terminal-Lego-15k (Harbor dataset). Write a program (in Python) that demonstrates the limitations of using regular expressions to parse XML/HTML by implementing both a regex-based parser and a proper parser, then comparing their…
The task
Write a program (in Python) that demonstrates the limitations of using regular expressions to parse XML/HTML by implementing both a regex-based parser and a proper parser, then comparing their outputs against a set of tricky XML/HTML edge cases.
Part of PrimeIntellect/Terminal-Lego-15k.