I am using the following code to extrack URL from a PHP string. But what if I also want to get the text which comes before the URL.
String examples