Can someone please help me build regex to make sure that a string starts with one of the following?
https://www.youtube.com
https://www.youtube.be
http://www.youtube.com
http://www.youtube.be
https://youtube.com
https://youtube.be
http://youtube.com
http://youtube.be
www.youtube.com
www.youtube.be
youtube.com
youtube.be
I am working in on PHP system that allows people to add a YouTube video to a web page, I only need to make sure that the link users add begins appropriately and is also a valid URL. That should be then be safe enough for the string to be stored after the user has entered it and also embedded as a YouTube video when viewed later.