Index: branches/5.1.x/units/shipping_quote_engines/usps.php =================================================================== diff -u -r13465 -r13549 --- branches/5.1.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 13465) +++ branches/5.1.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 13549) @@ -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; }