X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=format.php;h=fc04b1be56129e61d66d942d35dfff6f66c6aac6;hb=f7f243ac52fea086657aca1b589018778d7198d6;hp=d5fb32bef179e2490a424f1767670db659964974;hpb=a4814b960c7aabf4c6432c122fa0da675d5681b3;p=wfpl.git diff --git a/format.php b/format.php index d5fb32b..fc04b1b 100644 --- a/format.php +++ b/format.php @@ -23,7 +23,8 @@ # This file contains basic encodings function format_int($str) { - return ereg_replace('[^0-9]', '', $str); + $str = ereg_replace('[^0-9]', '', $str); + return ereg_replace('^0*([1-9])', '\1', $str); } function format_oneline($str) {