http://www.dailymotion.com/video/x3vfu7n_kashif-abbasi-take-class-of-zaeem-qadri_news 我需要从dailymotion网址获取视频ID。我需要正则表达式。感谢
答案 0 :(得分:1)
尝试以下正则表达式:
NSString *strRegExp=@"/video/([^_]+)/";
NSError *regexError = nil;
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:strRegExp options:NSRegularExpressionCaseInsensitive error:®exError];
if (regexError) {
NSLog(@"regexError: %@", regexError);
}