$re = '/^(?=-.*D$|\d.*C$)-?(?=(?:\d,?){1,13}\.)(?:0|[1-9]\d{0,2}(?:,\d{3})*)\.\d{2} [DC]$/m';
$str = '-0.48 D
-1.00 D
-2,000.00 D
-100,000.56 D
-100,000.00 D
-1,123,456.43 D
-1,123,456,000,000.43 D
-10,123,456,000,000.43 D
-1,123,456.43 C
-3,000,62.45 D
-03,000.45 D
-.23 D
0.23 C
1.00 C
2,000.00 C
100,000.56 C
100,000.00 C
1,123,456.43 C
1,123,456,000,000.43 C
10,123,456,000,000.43 C
';
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