<?php
$str = 'aaa@aaa|aaa/nbbb@bbb|bbb/nggg@ggg|ggg';
PD9waHAKJHN0ciA9ICdhYWFAYWFhfGFhYS9uYmJiQGJiYnxiYmIvbmdnZ0BnZ2d8Z2dnJzsKcGFyc2Vfc3RyKHByZWdfcmVwbGFjZShhcnJheSgnL1wvLycsICcvXHwvJyksIGFycmF5KCcmJywgJz0nKSwgJHN0ciksICRyZXMpOwpwcmludF9yKCRyZXMpOw==