diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/data_types/value.ml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/data_types/value.ml b/lib/data_types/value.ml index 6bf85ae..5c54369 100644 --- a/lib/data_types/value.ml +++ b/lib/data_types/value.ml @@ -1,6 +1,6 @@ external show_float : string -> float -> string = "show_float" -let match_date = Re.Str.regexp {|[0-9]+/[0-9]+/[0-9]+|} +let match_number = Re.Str.regexp {|[0-9]+$|} type t = | Null @@ -19,5 +19,6 @@ let to_string locale = function | false -> c | true -> (* If the string is a date, do not escape it *) - if Re.Str.string_match match_date c 0 then c - else String.concat "" [ "=\""; c; "\"" ]) + if Re.Str.string_match match_number c 0 then + String.concat "" [ "=\""; c; "\"" ] + else c) |
