Any help appreciated. So let's say in the db I have:
[url]https://www.youtube.com/watch?v=RandomCharactersHere[/url]
And I want it to be:
https://www.youtube.com/watch?v=RandomCharactersHere
I want to remove the URL code but only from youtube links so a replace all will not work unless it knows it is a YT link. Would something like this work? http://stackoverflow.com/a/35584060 So you could append [a-zA-Z0-9] to https://www.youtube.com/watch?v= So code that would essentially say:
To trim tail:
Find [url]https://www.youtube.com/watch?v=[a-zA-Z0-9][/url] and remove [/url] after string.
To trim head:
Find [url]https//www.youtube.com/watch...(not sure if I need entire string in this one) remove [url] before string.
Would it need to know how many characters the video number was? [a-zA-Z0-9]{8}
If so, I could go through however many it could possibly be to change them all.
Of course I would also need to do this with url and URL to cover all cases but I could just do it twice, and also the share code https://youtu.be/, but I can figure the share code out once I get this.
Thanks for any help!