I tried to write regular expression that extract value between <ul class=\"theatre\"> and </ul>
I wrote that regex:
<ul class=\"theatre\">(\s)*[<>/ =":\._,)(a-zA-Z0-9(\s)ĄĘŚĆŻŹŁÓĆŃąęśćżźłóćń\-]+</ul>
My question is, how to modify this regular expression to get result ended by first encountered </ul> tag? Here’s my example:
It should by ended before <div class=
I know that regex shouldn’t been used for html (I have read about that before on SO). I just have to do it, to understand why it’s not ended on first </ul> and how I can fix it.
You could use
For example, in Javascript, you could do