$re = '/^.*?p1_1_(?:(?!\|@\|).|\|{2})*\|([^|]+)(?:\|@\||$)/m';
$str = 'text|p1_1_1120170AS074192161A0Z20|C M E - Rectifier|@|text|p1_2_1120170AS074192161A0Z20|Huawei|@|text|p1_3_1120170AS074192161A0Z20|Rectifier Module 3KW|@|text|p1_4_1120170AS074192161A0Z20|Shuangdeng 6-FMX-170|@|text|p1_5_1120170AS074192161A0Z20|24021665|@|text|p1_6_1120170AS074192161A0Z20|1120170AS074192161A0Z20|@|text|p1_7_1120170AS074192161A0Z20|OK|@|text|p1_8_1120170AS074192161A0Z20||@|text|p1_9_1120170AS074192161A0Z20|ACTIVE|@|text|p1_10_1120170AS074192161A0Z20|-OK|@|text|site_id|20MJK110|@|text|barcode_flag|auto|@|text|movement_flag||@|text|unit_of_measurement||@|text|flag_waste|no|@|text|req_qty_db|2|@|text|req_qty|2
text|p1_1_1120170AS074192161A0Z20||@|text|p1_2_1120170AS074192161A0Z20|Huawei|@|text . . .';
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