|
|
|
|
|
by l_t
2811 days ago
|
|
The author's stated stance is that you can, but usually shouldn't. Personally, I think to myself before using regexes to parse HTML: 1. Am extracting more than the contents of a single element? 2. Is the input HTML prone to change? 3. Will there be issues if the parsing completely fails? 4. Do I plan to use this code for more than a few months? If the answer to any of the questions is "Yes", then don't use a regex :) |
|