protected function ParseContactsData() { if (preg_match_all("/(?>\\[)(?>(?>'[^']*'),[^,\\]]*,)'([^']*)(?>[^\\[]+[\\[]+){2}'([^\\]']+)(?>'[\\]]{2,},)/si", $this->RawSource, $matches) || preg_match_all("/(?>\\[)(?>(?>'[^']+)'[^']*){2}'([^']*)(?>[^\\[]+)\\['([^\\]']+)(?>'\\]\\],)/si", $this->RawSource, $matches)) { list($e, $n) = SPUtils::array_multimap(array("SPUtils", "decode_html_escaped"), $matches[2], $matches[1]); $data = array_map(null, $n, $e); while (list($name, $email) = current($data)) { if (strpos($email, "@")) { if ($name == "") { $name = current(explode("@", $email)); } $this->__add_contact_item($name, $email); } next($data); } } if (!$this->ContactsCount) { $this->Error = ContactsResponses::ERROR_NO_CONTACTS; return false; } return true; }