Jak to jest z YouTube ?
Jak dam więcej niż jeden link to wyświetla tylko pierwszy jako film ?
Bo tak to działa, czy poprostu coś źle wpisuje ?
yamall - 29 gru 2012 22:02 napisał(a):Jak to jest z YouTube ?
$regex='~
# Match non-linked youtube URL in the wild. (Rev:20111012)
(<a\s*(.*)>)?
(https?://)? # Required scheme. Either http or https.
(?:[0-9A-Z-]+\.)? # Optional subdomain.
(?: # Group host alternatives.
youtu\.be/ # Either youtu.be,
| youtube\.com # or youtube.com followed by
\S* # Allow anything up to VIDEO_ID,
[^\w\-\s] # but char before ID is non-ID char.
) # End host alternatives.
([\w\-]{11}) # $1: VIDEO_ID is exactly 11 chars.
(?=[^\w\-]|$) # Assert next char is non-ID or EOS.
[?=&+%\w\-]* # Consume any URL (query) remainder.
(</a>)?
~ix';
Powrót do Uwagi, sugestie, problemy
Użytkownicy przeglądający ten dział: Brak zidentyfikowanych użytkowników i 31 gości