Useful Regular Expressions (regex)

Grab the Playlist ID from a YouTube playlist URL

^.*?(?:list)=(.*?)(?:&|$)

Example string

https://www.youtube.com/watch?v=nKXuYvpg2hE&list=PLERasyubmasWWIUBN8-pwoEzKSsU7iTT0

 

Tags