I've been trying to find a regex pattern to replace all youtube URLs in a string with the iframe embed code (C#). Obviously the video ID has to extracted. Here is the url patterns that should match:
- http://www.youtube.com/watch?v=bSiDLCf5u3s
- https://www.youtube.com/watch?v=bSiDLCf5u3s
- www.youtube.com/watch?v=bSiDLCf5u3s
- youtu.be/bSiDLCf5u3s
- http://www.youtube.com/watch?feature=player_embedded&v=bSiDLCf5u3s
- www.youtube.com/watch?feature=player_embedded&v=bSiDLCf5u3s