Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2f6b017

Browse files
Update DetectFloatingPointNumbers.py
Regex Pattern updated as mentioned in review.
1 parent e13dbd5 commit 2f6b017

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎RegexandParsing/DetectFloatingPointNumbers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
from re import match, compile
1111

12-
pattern = compile('^[-+]?[0-9]*\.[0-9]+$')
12+
pattern = compile('^[-+]?\d*\.\d+$')
1313
for _ in range(int(input())):
1414
print(bool(pattern.match(input())))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /