$re = '/^\w{42} /m';
$str = '0x8DA1937198d1A51d735aa3E57423183888539E48 0x92b7b421992ef490f3b75898ec0e511f1a5c02422819d89719b20362b023ce4f
0x5D9D8F9F0E0E3D6B07C4Fa829Bf0550D5846E6e2 0x4a7657258f0bc1744c32bed405c0b53b5addcf210f8c15a8f69d168b0ccfc492g2
';
$subst = "";
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$result;
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