From 61a5bf32de66947feb0e46aaef60a6c0b8cd2af4 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 26 May 2019 19:59:09 +0800 Subject: [PATCH] test --- bot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.go b/bot.go index cb0392e..2a3f063 100644 --- a/bot.go +++ b/bot.go @@ -270,7 +270,7 @@ func botListParsingRule(m *tb.Message) { } func botTimer(m *tb.Message) { - r := regexp.MustCompile("^(?P[0-9]{2}h){0,1}(?P[0-9]{2}m){0,1}(?P[0-9]{2}s){0,1} \"(?P(.*))\"$") + r := regexp.MustCompile("^((?P[0-9]{2})h){0,1}((?P[0-9]{2})m){0,1}((?P[0-9]{2})s){0,1} \"(?P(.*))\"$") if r.MatchString(m.Payload) { log.Printf("Timer : Hour : %s\n", r.ReplaceAllString(m.Payload, "${Hour}")) log.Printf("Timer : Minute : %s\n", r.ReplaceAllString(m.Payload, "${Minute}"))