Off the top of my head, you can do something like:
$myString = explode ("|", $text);
This will put $text into an array. You could then delete the 3rd element of the array, and recombine it with:
implode ("|", $myString);
But I am sure there must be an easier approach, maybe using the PHP equivalent of VB's $left, $mid, $right functions.