$re = '/^Soldto:(?:.*\R){2}\K((?:(?!\s{2}).)+)\K\s*\K((?:(?!\s{2}).)+)/m';
$str = 'Soldto: Shipto: Billto:
00011222 00017872 10221060
COSTCO CO INC. - GLOBAL EDI COSTCO LANGLEY DEPOT COSTCO CO/LANGLEY
';
preg_match($re, $str, $matches, PREG_OFFSET_CAPTURE, 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