language: PHP (php 5.4.4)
date: 207 days 9 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
$input = <<<XYZ
<a href = "http://www.example.com/roger/that"> </a> => not extracted
<a href="http://www.example.com/roger/view/that"</a>  => extracted
XYZ;
 
$pattern = '/\<a href(.*?\/view\/.*?)<\/a>/';
preg_match_all($pattern, $input, $matches);
print_r($matches);