M
M
Mesuti2020-06-16 20:20:50
JavaScript
Mesuti, 2020-06-16 20:20:50

Regular to remove tags and their content?

Hey!
Tell me, what regular expression can I remove tags with content using the replace method?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2020-06-16
@saboteur_kiev

I think it would be right to learn how to use https://developer.mozilla.org/en-US/docs/Web/API/D...
Regular is suitable for simpler cases. In the case of HTML, you can get confused about quotation marks, tags within tags, and deal with these issues all the time.
And once you learn how to use the right parser, and you can parse anything as a structured object.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question