Index: branches/5.0.x/units/shipping_quote_engines/usps.php =================================================================== diff -u -r12924 -r13262 --- branches/5.0.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 12924) +++ branches/5.0.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 13262) @@ -1,6 +1,6 @@ 10 ) $res = substr($res, 0, 10); + $res = preg_replace('/[(]|[)]|[\-]|[ ]|[#]|[\.]|[a-z](.*)|[A-Z](.*)/g', '', $phone); + if ( strlen($res) > 10 ) { + $res = substr($res, 0, 10); + } return $res != '' ? $res : $phone; }