<?php
$string = "example.com/TARGET/noneed/noneed/noooo";
preg_match("#/(.*?)/#", $string, $match);
echo $match[1];	
?>