<?php
$sbj = addslashes(strip_tags('<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/145834350&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>'));
$ptrn = '/^src="([^"]+)/';
preg_match($sbj, $ptrn, $match);
print_r($match);
- Output for 5.4.9 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- Warning: preg_match(): Empty regular expression in /in/lK2CP on line 7
preferences:
204.78 ms | 404 KiB | 234 Q