Skip to content

Instantly share code, notes, and snippets.

View pietrobasso's full-sized avatar

Pietro Basso pietrobasso

View GitHub Profile
@pietrobasso
pietrobasso / ExtractYouTubeId.playground
Last active October 7, 2020 22:59 — forked from zdk/extract_youtube_id.mm
A Regex to extract YouTube video ids from the given list of youtube URLs in Swift 4
//: Playground - noun: a place where people can play
//
// Created by Pietro Basso on 29/06/2018.
// Copyright (c) 2018 Pietro Basso. All rights reserved.
//
let urls = ["http://youtu.be/NLqAF9hrVbY",
"http://www.youtube.com/watch?feature=player_embedded&v=DJjDrajmbIQ",
"http://www.youtube.com/watch?v=dQw4w9WgXcQ",
"http://www.youtube.com/embed/NLqAF9hrVbY",