Story
The true power of regular expressions (2012)
1 report
1 website
1 discussion
Latest report
Overview
Regular expressions can be effective for parsing specific aspects of HTML, despite the common belief that HTML is not regular. Using regular expressions in certain contexts can yield practical results, challenging the notion that XML parsers are the only viable solution.
Summary from npopov.com.
Reports
One report so far. Additional coverage will appear here when it is linked to this story.
Community reactions
Each reaction summarizes sampled comments from the linked discussion.
Hacker News · npopov.com
Historical count: 5 · 5 saved in sample · Historical sample
Analysis ready
Read this discussion’s reaction
Based on 5 sampled comments from this thread. Analyzed 2026-08-03.
- Praise: Regex is compact and declarative, offering a unique solution to text processing that alternatives like substring searches simply can't match.
- Praise: Despite its complexity, regex has a rich composability potential that many programming languages overlook, limiting its full utility.
- Praise: For many practical applications, such as counting tags, regex proves effective even if it isn't suited for parsing entire documents.
- Concern: Reading regex can feel like deciphering a complex mathematical formula, making it daunting for many developers who struggle with its dense syntax.
- Concern: The conflation of regex with specific implementations like PCRE misleads users about its true capabilities, especially regarding performance and complexity.
- Concern: Regular expressions can be notoriously slow depending on how they are crafted, which can lead to significant performance issues in real-world applications.