can any one provide me with a regular expression that can convert. http://www.youtube.com/watch?v=xC5uEe5OzNQ PHP: http://www.youtube.com/v/xC5uEe5OzNQ?f=playlists&app=youtube_gdata&hl=en_US&fs=1&rel=0 PHP: the changes are instead of watch?v= it will be /v/ and rest are all constant. can anybody help.
$text = preg_replace('%/watch?v=%'. '/v/', $text); PHP: That said you would probably be better off using parse_url(), parse_str() and http_build_query() to achieve this properly