you can use $gettok() ...

$gettok(buffalo.dog/cat.dog.buffalo,2,47) returns cat.dog.buffalo