The expression I have now (<div class=\"oembed.*)V(.*?)<\/div>
How to get data till the 1st"</div>"
? Because now it goes till the last 3rd "</div>"
UPDATE #1:
I'm looking for V
that's in a div that starts with the class="oembed
The result I want to get with regex:
<div class="oembed oembed-type-instagram oembed-pre-frame" data-oembed-medialink="https://www.instagram.com/p/B_BEXwtp-V7/" style="margin:10px auto;" data-oembed-url="https://api.instagram.com/oembed/?url=https%3A%2F%2Fwww.instagram.com%2Fp%2FB_BEXwtp-V7&format=json&maxwidth=500&embed=widget&width=1" data-oembed-id="B_BEXwtp-V7" data-oembed-options='{"maxwidth":"500","embed":"widget","width":true}'>1st div</div>
UPDATE #2:
I'm using this PHP code: https://paiza.io/projects/aU_FO4ihErlQngYFy6xvJg
The result is:
' Vがある<br>
<div id="body-top" class="content-moki clearfix">
Vがある<br>
<span class="headline">
<br>
にモデル「V」を入れると、プレビューでエンベットが崩れる<br>
<br>
<div class="oembed oembed-type-instagram" data-oembed-medialink="https://www.instagram.com/p/B5mtrL3p3X@CHANGE@/" style="margin:10px auto;max-width: 500px;" data-oembed-url="https://api.instagram.com/oembed/?url=https%3A%2F%2Fwww.instagram.com%2Fp%2FB5mtrL3p3X@CHANGE@&format=json&maxwidth=500&width=1" data-oembed-id="B5mtrL3p3X@CHANGE@" data-oembed-options=\'{"maxwidth":"500","width":true}\'><figure class="moki-embed-instagram"><img src="https://instagram.com/p/B5mtrL3p3X@CHANGE@/media/?size=l"><figcaption><i class="fa fa-instagram icon"></i></figcaption></figure></div> @CHANGE@がある<br>a </div> @CHANGE@...</div>'
But I have to get this result:
' Vがある<br>
<div id="body-top" class="content-moki clearfix">
Vがある<br>
<span class="headline">
<br>
にモデル「V」を入れると、プレビューでエンベットが崩れる<br>
<br>
<div class="oembed oembed-type-instagram" data-oembed-medialink="https://www.instagram.com/p/B5mtrL3p3X@CHANGE@/" style="margin:10px auto;max-width: 500px;" data-oembed-url="https://api.instagram.com/oembed/?url=https%3A%2F%2Fwww.instagram.com%2Fp%2FB5mtrL3p3X@CHANGE@&format=json&maxwidth=500&width=1" data-oembed-id="B5mtrL3p3X@CHANGE@" data-oembed-options=\'{"maxwidth":"500","width":true}\'><figure class="moki-embed-instagram"><img src="https://instagram.com/p/B5mtrL3p3X@CHANGE@/media/?size=l"><figcaption><i class="fa fa-instagram icon"></i></figcaption></figure></div> Vがある<br>a </div> V...</div>'
You can see the difference here - https://www.diffchecker.com/n4LIOMtH