12-27-2014, 09:48 AM
Hi guys, could you help me sort out the YouTube IDs?
Unfortunately YouTube now offers custom IDs to people with 500 min. subscribers only, so I am forced to allow the long weird URLs on my forum as well.
At the moment I have this regex:
Unfortunately YouTube now offers custom IDs to people with 500 min. subscribers only, so I am forced to allow the long weird URLs on my forum as well.
At the moment I have this regex:
PHP Code:
|
Which allows - http/https +/ www:
Code:
|
But it would be amazing if someone could help me with doing it so that you can just enter the ID as well, eg:
http/https and/or www:
PHP Code:
|
*youtube.com/CoolUserName - optional.
So the display format would be: {VALUE$1}{VALUE$2}
Unless there is a way to just store the ID (value 1) from the entered URL into the database?