Spaces:
Sleeping
Sleeping
Update getValues.py
Browse files- getValues.py +10 -10
getValues.py
CHANGED
@@ -8,19 +8,19 @@ def findTime(input)
|
|
8 |
|
9 |
time_regex1 = r"" (1[0-2]|[1-9]):[0-5][0-9](am|AM|PM|PM|pm)"
|
10 |
time_search = re.search(time_regex1, input)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
if time_search:
|
12 |
time = time_search.group(0)
|
13 |
-
return time
|
14 |
-
|
15 |
-
else:
|
16 |
-
time_regex2 = r""(1[0-2|[1-9]])\s?(am|AM|pm|PM)"
|
17 |
-
time_search = re.search(time_regex2, input)
|
18 |
-
if time_search:
|
19 |
-
time = time_search.group(0)
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
|
26 |
def findNumber(input:)
|
|
|
8 |
|
9 |
time_regex1 = r"" (1[0-2]|[1-9]):[0-5][0-9](am|AM|PM|PM|pm)"
|
10 |
time_search = re.search(time_regex1, input)
|
11 |
+
if time_search:
|
12 |
+
time = time_search.group(0)
|
13 |
+
return time
|
14 |
+
|
15 |
+
else:
|
16 |
+
time_regex2 = r""(1[0-2|[1-9]])\s?(am|AM|pm|PM)"
|
17 |
+
time_search = re.search(time_regex2, input)
|
18 |
if time_search:
|
19 |
time = time_search.group(0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
+
return time
|
22 |
+
else:
|
23 |
+
return "notime"
|
24 |
|
25 |
|
26 |
def findNumber(input:)
|