Regex Match After Last Occurrence

If you need to find the text after las occurrence, you can use regex easily.

regex-match-after-last-occurrence

Regex: [^\/]+$

Example
[php]
$url = "http://www.google.com/category/title.html";
preg_match("/[^\/]+$/", $url, $out);
print_r($out); // Array ( [0] => title.html )
[/php]

Other Example
[php]
$url = "aaaaabbbbb";
preg_match("/[^a]+$/", $url, $out);
print_r($out); // Array ( [0] => bbbbb )
[/php]