I'm trying to select a part of an HTML code with RegEx but I'm not getting the regular expression correct, could anyone help?
I need to select the <li>
groups separately, ie without the presence of the <br>
tag in the middle.
For example, I'm trying with the expression below:
/<li.*(?!<br).*\/li>/gi
You must select the following text separately:
<li>Teste 1</li><li>Teste 2</li><li>Teste 3</li>
In this test , I created two occurrences of this list, however the expression is selecting everything from the first occurrence to the last.
How do I select the two lists separately?