Skip to content

Instantly share code, notes, and snippets.

@gheydon
Created June 18, 2022 13:44
Show Gist options
  • Save gheydon/1fbc6ed9491362f927fb084c547e707c to your computer and use it in GitHub Desktop.
Save gheydon/1fbc6ed9491362f927fb084c547e707c to your computer and use it in GitHub Desktop.
Youtube Id extraction regexp
(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)|(?:shorts)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment