i have string:
<em>hhhhhhhhhhhhh gggggggggggg hhhhhhhhhhh</em> <strong>hhhhhhhhhh hhhhhhhhh hhhhhhhhh</strong> gggggggggg ggggggg hhhhhhhhhhh ggggggggggggggggggggggggg <em>ggggggg ggggggg <strong>gggggggg dddddddddd</strong></em>
And now i wont find :
var regex = /<em>(.*?)<\/strong><\/em>/g;
var spr = string.match(regexxx);
alert(spr.toString());
This prints my full string.
<em>hhhhhhhhhhhhh gggggggggggg hhhhhhhhhhh</em> <strong>hhhhhhhhhh hhhhhhhhh hhhhhhhhh</strong> gggggggggg ggggggg hhhhhhhhhhh ggggggggggggggggggggggggg <em>ggggggg ggggggg <strong>gggggggg dddddddddd</strong></em>
And sure this is good. But this is not what i want! I want this:
<em>ggggggg ggggggg <strong>gggggggg dddddddddd</strong></em>
Regex must find everything between:
<em>...</strong></em>
but not if between
<em>..**</em>**.</strong></em> .
This is not correct:
<em>testestest</em>test test</strong></em>
This is good:
<em>test<strong>test test</strong></em>
What regular expression do I use to do this?