preg_match_all('/[\s]{1}(AA|BB|CC)+[\s]{1}/',' AA BB ',$matches);
结果是AA,但我需要AA和BB.
AA
BB
php regex
php ×1
regex ×1