php - Extracting a string between an "id_" and a ".html" -
i want extract id youku video:
http://v.youku.com/v_show/id_xntu2nzqynzq0.html?f=19275195&ev=3
the id random letter between id_ , .html
how accomplish that?
use this
$input = 'http://v.youku.com/v_show/id_xntu2nzqynzq0.html?f=19275195&ev=3'; preg_match('~id_(.*?).html~', $input, $output); echo $output[1];
output
xntu2nzqynzq0
Comments
Post a Comment