Update the regular expression to make milliseconds optional.