Please an explanation

In the regex course it reads:

Note: Parsing HTML with regular expressions should be avoided, but pattern matching an HTML string with regular expressions is completely fine.

and I went “what?” I haven’t messed with HTML yet but if someone could break it down with some example or a nice explanation I would appreciate it.

Please post a link to the exercise.

There’s no exercise. This is from the regex course notes:

Find Characters with Lazy Matching

I just want to understand the meaning of the Note that is highlighted in the course:

Note: Parsing HTML with regular expressions should be avoided, but pattern matching an HTML string with regular expressions is completely fine.

I think the most important difference is the difference between parsing and matching

Yes that is true. Usually to parse means to split up a string into component parts. While to match means to just look for a string.

Many thanks for your help! :grinning:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.