如何从具有<b>标记的文件路径php中提取最后一个数据

I am tying to retrive the last part of an path . I have an path value

/var/local/<b>india/aaa.php</b>-who is this

I need to retrive the aaa.php-who is this using php regex.

Code : (FIXED)

$pattern = '/<b>[a-z\/\.\-]+\/([a-z\.\-]+)<\/b>(.+)/i';
preg_match($pattern, $path, $matches);

$result = $matches[1].$matches[2];

echo $result;

Output : (FIXED)

aaa.php-who is this


Another approach : ('shorter', with the same result)

$path = str_replace("</b>","",$path);
preg_match('/.+\/(.+)/i', $path, $matches);
$result = $matches[1];

Do you have to use regex?

If not, here is an alternative to using regex, if the path structure is always the same:

$path = "/var/local/<b>india/aaa.php</b>-who is this";
$lst_temp = explode('/', $path);
$url = str_replace("</b>", '', $lst_temp[3]);