I have a string in php formatted like this:

```
http://aaaaaaaaaa/*http://bbbbbbbbbbbbbbb

```

where aaa... and bbb.... represent random characters and are random in length.

I would like to parse the string so that I am left with this:

```
http://bbbbbbbbbbbbbbb

```
['https://Stackoverflow.com/questions/8737854', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/657818/']
Hi This would help you to get the address:

```
$str = 'http://www.example.com/*http://www.another.org/';
$pattern = '/^http:\/\/[\.\w\-]+\/\*(http:\/\/.+)$/';
//$result = preg_replace($pattern, '$1', $str);
$found = preg_match_all($pattern, $str, $result);
$url = (!$found==0) ? $result[1][0] : '';
echo $str . '<br />' . $url;

```
Here is a clean solution: grab everything after the last occurrence of "http://".

```
$start = strrpos($input, 'http://');
$output = substr($input, $start); 

```