Код: Выделить всё
[figure src="" url"" caption=""]
Я пытаюсь получить src из приведенного выше кода, основываясь на этом коде:
Код: Выделить всё
$pattern = '/]*src=\"?(?[^\"]*)\"?[^>]*>/im';
preg_match( $pattern, $html, $matches );
if($matches['src']) {
return $matches['src'];
}
Подробнее здесь: https://stackoverflow.com/questions/161 ... tcode-text