+ //*************************************************************************
+ // Read from the back of $haystack until $needle is found, or the begining
+ // of the $haystack is reached. $needle is a single character
+ //*************************************************************************
+ function readMailboxParent($haystack, $needle) {
+ if ($needle == ".") $needle = "\.";
+ ereg("^(.+)$needle([^$needle]+)$needle?$", $haystack, $regs);
+ return $regs[1];
+ }
+