How to match a part of an <iframe> tag?

后端 未结 6 2024
小鲜肉
小鲜肉 2021-01-21 13:48

I\'m trying to match the highlighted parts of this string:

 maybe something here src=\"http://some.random.url.com/\" and the string continues.         


        
6条回答
  •  情话喂你
    2021-01-21 13:53

    ]*(src="[^"]+")[^>]*|', $html, $matches);
    
    var_dump($matches);
    

    Output:

    array(2) {
      [0]=>
      string(75) "