Is there a regex to get youtube video links or ids from embedded youtube videos on webpages?
To find: "<object(.*)youtube.com/v/(.*)\"(.*)</object>"
"<object(.*)youtube.com/v/(.*)\"(.*)</object>"
To convert to a link: replace("<object(.*)youtube.com/v/(.*)\"(.*)</object>", '<a href="http://www.youtube.com/watch?v=\\2">click here</a>', $str)
replace("<object(.*)youtube.com/v/(.*)\"(.*)</object>", '<a href="http://www.youtube.com/watch?v=\\2">click here</a>', $str)
source