Thread: regex help
View Single Post
Old 12-28-2010, 07:45 AM  
Kiopa_Matt
Confirmed User
 
Industry Role:
Join Date: Oct 2007
Posts: 1,448
I don't understand what you're trying to do. Just get the video ID? Assuming it's PHP:

Code:
if (preg_match("/\?([\w\d]+)/", $url, $match)) { 
    $video_id = $match[1];
} else { echo "No Video ID"; }
You don't need that combumbulated mess of a regex.
__________________
xMarkPro -- Ultimate Blog Network Management
Streamline your marketing operations. Centralize management of domains, pages, Wordpress blogs, sponsors, link codes, media items, sales and traffic statistics, plus more!
Kiopa_Matt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote