Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a60514c

Browse files
authored
Update working.py
1 parent bb4433c commit a60514c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

working.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def main():
2222

2323
def convert(s):
2424
try:
25-
if matches := re.match("([0-9][0-2]?):?([0-5][0-9])? ([A|P][M]) to ([0-9][0-2]?):?([0-5][0-9]?)? ([A|P][M])", s):
25+
if matches := re.match("^([0-9][0-2]?):?([0-5][0-9])? ([A|P][M]) to ([0-9][0-2]?):?([0-5][0-9]?)? ([A|P][M])$", s):
2626
# print(f'{matches.group(1)}, {matches.group(2)}, {matches.group(3)}, {matches.group(4)}, {matches.group(5)}, {matches.group(6)}')
2727

2828
if matches.group(3) == "AM":

0 commit comments

Comments
 (0)