I have a text like
string 1 :
I am a text and this is a youtube video https://www.youtube.com/watch?v=j82FBbgpUy4 !!!
I would like to extract the youtube video url from the string and return it.
Result :
string 2 :
https://www.youtube.com/watch?v=j82FBbgpUy4
Is there another way more efficient than spliting the string by spaces and searching in the array if it contains "https://www.youtube.com/watch?v=" (it's not the best way to do it)? I cannot find any other solution