$re = '/^.*?([A-Z]{2,}(?: [A-Z]{2,}){1,2})/m';
$str = '성 벼 | 5 번YAO LIAO거 CHINA P R체류자격 결혼이민F-1)말급일자\', # \'YAO LIAO\'
성 별 F 등록번호명 JAO HALJUNGCHINA P R격 결혼이민(F-6)밥급인자\', # \'JAO HALJUNG\'
성 별 F명 CHENG HAIJING국 가 CHINA P R 역체 가차격 결혼이민(C-4) 박급인자\', # \'CHENG HAIJING\'
KOa MDOVUD TAREEQ SAID HAFIZULLAH TURKIYE움첫;자격 거주(F-2)발급일자\', # \'DOVUD TAREEQ SAID HAFIZULLAH\'
KOn 별 MDOVUD TAREEQ SAID- IIAFIZULLAH 감 TURKIYE동체나자격 거주F-2) 발급일자\', # \'DOVUD TAREEQ SAID- IIAFIZULLAH\'
등록번호IN" 성 별 M명 TAREEQ SAD IIAFIZULLAH 값 TURKIYE8체주자격 거주-2)발급일자\' # \'TAREEQ SAD IIAFIZULLAH\'
]';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
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