This little regex script gives you another simple way to fetch for all possible URLs embedded as simple text in a your rather large description text.
It’s flexible and you can add more filters appropriate for your requirement as you wish..
# take it to the test! $matches = null; $returnValue = preg_match_all('%(https://|http://|www)[a-zA-Z0-9\/#&-_\.]+%', $desc_variable, $matches); # see what you got! var_dump($matches);
Enjoy!