Skip to content

Commit 0abe76a

Browse files
committed
Use only digits in number regex
1 parent 429e350 commit 0abe76a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/json/tool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ def main():
8383

8484

8585
color_pattern = re.compile(r'''
86-
(?P<string>"(\\.|[^"\\])*?") | # String
87-
(?P<number>NaN|-?Infinity|[\d\-+.Ee]+) | # Number
88-
(?P<boolean>true|false) | # Boolean
89-
(?P<null>null) # Null
86+
(?P<string>"(\\.|[^"\\])*?") | # String
87+
(?P<number>NaN|-?Infinity|[0-9\-+.Ee]+) | # Number
88+
(?P<boolean>true|false) | # Boolean
89+
(?P<null>null) # Null
9090
''', re.VERBOSE)
9191

9292

0 commit comments

Comments
 (0)