Regular Expression HTML tags
- by user134615
I'd like to know whether it exists a way to put the following HTML tags in a regex. What I want is a regex that can match all the start tags with their corresponding closing tags.
E.g.,
Hello
There might be more tags inside.
I had thought of something like this: ^<([a-z]+)([^<]+)(?:(.)</\1|\s+/)$/, but it wont work.
Sorry if this question doesnt belong to this section.
Thank you.