By mswatcher
via johndcook.com
Submitted: Feb 21 2013 / 10:50
Can regular expressions parse HTML? There are several answers to that question, both theoretical and practical. First, let’s look at theoretical answers. When programmers first learn about regular expressions, they often try to use them on HTML. Then someone wise will tell them “You can’t do that. There’s a computer science theorem that says regular expressions are not powerful enough.” And that’s true, if you stick to the original meaning of “regular expression.”
Add your comment