$re = '/.*"email":"(.*?)".*emailActivationSecret":"(.*?)".*"_id":"(.*?)".*/m';
$str = '"__v":0,"language":"en","jobTitle":"Executive","firstName":"wer","lastName":"wre","email":"fde+98989@gmail.com","phone":"+1 213-321-3232","_companyId":"5723erera8b2196fdaer9502b86dc7","accountStatus":"UNVERIFIED","role":"ADMIN","emailActivationSecret":"XD1EererreQyVLFn1IjJg7QQNcDz9RLZ1xrKnl84XI5Nb5","_id":"5723a8b21er96fwereeda9ewree502b86dc8","products":[],"created":"2016-04-29T18:32:18.700Z"}
';
$subst = "webserver-wat:3001/activateAccount?email=$1&secret=$2&companyId=$3";
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$result;
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php