I would like to check in PHP, if a string contains an URL to a specific domain and save it in a new string.
example: “Check out my latest video here http://www.youtube.com/?123“
So now the new string should have the value “http://www.youtube.com/?123”.
If there is another link in the example, but not from youtube, the string should still only contain the youtube value.
Your specific domain in the following example is “youtube.com”