<?php

function emailFinder($string){
	$matches=[];
	$regexp='/\b\w+@\w+\.\w+\b/';
	preg_match_all($regexp,$string,$matches);
	
	foreach ($matches[0] as $key){echo "$key\n";}}

emailFinder('rgjgfdlg;l ya@ya.ru pois@ya.ru fdgkfdgdflg rep@rep.ru');