diff --git a/xmpp/DateTime.hx b/xmpp/DateTime.hx
index e372f33..79a0df2 100644
--- a/xmpp/DateTime.hx
+++ b/xmpp/DateTime.hx
@@ -24,8 +24,8 @@ package xmpp;
class DateTime {
static function __init__() {
- ereg_date = ~/^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])(T([0-9][0-9]):([0-9][0-9]):([0-9][0-9])(\.[0-9][0-9][0-9])?(Z|(-[0-9][0-9]:[0-9][0-9]))?)?$/;
- ereg_time = ~/^([0-9][0-9]):([0-9][0-9]):([0-9][0-9])(\.[0-9][0-9][0-9]Z?)?$/;
+ ereg_date = ~/^([0-9]{4})-([0-9]{2})-([0-9]{2})(T([0-9]{2}):([0-9]{2}):([0-9]{2})(\.[0-9]{3})?(Z|(-[0-9]{2}:[0-9]{2}))?)?$/;
+ ereg_time = ~/^([0-9]{2}):([0-9]{2}):([0-9]{2})(\.[0-9]{3}Z?)?$/;
}
/**