- print_r: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$pattern = "#^([^|]+)\|(\d+)([^|]+)\|(\d+)$#m";
$string = "Product 1|200Producht 392|150\nProduct 2|400Producht 592|250";
$matches = array();
$search = preg_match_all($pattern, $string, $matches, PREG_SET_ORDER);
print_r($matches);