Answer the question
In order to leave comments, you need to log in
How to add a regular expression to search inside a tag?
Help me people, I can’t figure out how to write a rhyme.
I need to find everything that is between the tags
<div class="WYSIWYG articlePage"> </div>
https://regex101.com/r/3YMWU6/1
I also tried like this
<([^\s]+)[\s+]class="(.*?)articlePage"[^>]*>([\s\S]*)<\/\1>
<div><div class="WYSIWYG articlePage"> </div></div>
Answer the question
In order to leave comments, you need to log in
In short, this is how it works
#<div\s+class="(.*?)articlePage">[^<>]*(<div[^>]*>(?:[^<>]*|(?1))*</div>)[^<>]*</div>#si
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question