- print_r: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$str = 'REXEL : Votre dossier Primexel n°@ref_dossier@ expire le @date_expiration@';
preg_match_all('/@([^@]+)@/i', $str, $matches);
print_r($matches);
if(is_array($matches[0])) {
echo 'trouvé';
}