<?php


preg_match('!/([^/]+)/[^/]*$!', 'http://w...content-available-to-author-only...w.example/test1/test2/test3/', $matches);
echo $matches[1];

?>