Hacker News new | ask | show | jobs
by justinator 2811 days ago
> People saying "Regexes can't match HTML, use an html library" are wrong to say regexes are incapable of it, but they're right to say to use a library meant for the job.

Plot twist: the html library is built upon regex's (at least in part).

1 comments

Every parser is partially built upon regexes. You have to go all the way until Haskell, Prolog or such languages before you get better options than regexes to build them.

But they are not built solely of regexes. They always have added control structures that complement regexes on those place they are worst.