WorldDMT commented on a Page, /youtube - YouTube Video Download Alias  -  Jun 05, 2009

no prob if u want u can try

Here are a valid YouTube link, but your regex detects an error

http://www.youtube.com/watch?gl=FR&hl=fr&v=BZmE3fUKU5U

your regex can be check all that valide links?? no!!

but look Here are 3 invalid YouTube links but your regex does not detect any error

1- http://www.youtube.com/watch?v=RFMT_IzT4&feature=rec-HM-fresh+div

RFMT_IzT4 <==== 9 characters not 11 !!!

2- http://ww.youtube.com/watch?v=Pc3yFlYlhCQ&feature=fvw

ww. <====== not www. !!

3- http://wwwxyoutubexcom/watch?v=Pc3yFlYlhCQ&feature=fvw

no dots!!!

so finally, my own opinion is

$regex($1,http:\/\/www\.youtube\..+\/watch\?(gl=..&..=..&v|v)=[^&]{11})

this regex will check if the link is

http://www.youtube.<something(.com .fr) mabe>/watch?= over 11 characters not include "&"

u can try that regex with all that links and that checking better

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.