Ankush05 commited on
Commit
df14808
·
1 Parent(s): 1f7f996

Update getValues.py

Browse files
Files changed (1) hide show
  1. getValues.py +2 -2
getValues.py CHANGED
@@ -6,14 +6,14 @@ import re
6
 
7
  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)
 
6
 
7
  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)