I am parsing the url using regex. Some urls is not showing completely. I am using the following code.
it is working if the $string value is following
$string= "[video width="1280" height="720" mp4="http://egghead-site.s3.amazonaws.com/samples/DOS.mp4" title="DOS Software"][/video]" ;
if the mp4 value is following then it is not working. it is returning the half url only.
$string =[video width="1280" height="720" mp4="http://egghead-site.s3.amazonaws.com/samples/Colon%20Health%20Final%20V3.mp4" title="Synergi" ][/video]";
$imageurl = !empty( $string ) ? preg_match_all('@((https?://)?([-\w]+\.[-\w\.]+)+\w(:\d+)?(/([-\w/_\.]*(\?\S+)?)?)*)@', $string , $match) : '';
return isset($match[0][0]) ? ut_portfolio_add_http($match[0][0]) : '';
I wanna to get the video url. I am new in regex so that I stuck at this point. Please let me know how can I get it in both cases.