I want to create a regex where url given will output me video id. I know that youtube id always has 11 characters, my regex kind of works, but it doesn't work when someone shared a video which is already played: i.e when you open a video it starts at x of seconds.
Please view my example here:
https://regex101.com/r/kgVkTE/1
([0-9A-Z{11}])\w+
Example url:
https://www.youtube.com/watch?v=MI9tFPT6yK4&t=17s
https://www.youtube.com/watch?v=48Y_jWQDDiw
https://www.youtube.com/MI9tPtdas5
https://www.youtube.com/9MI9tPtdas5