diff --git a/text/matcher.go b/text/matcher.go index bc2aee4..d55f7cb 100644 --- a/text/matcher.go +++ b/text/matcher.go @@ -19,7 +19,7 @@ func Matcher(update tgbotapi.Update, bot *tgbotapi.BotAPI) { } //nhentai - const nhentaiRegex string = "([ \\t\\n\\r]|^)\\d{2,}([ \\t\\n\\r]|$)" + const nhentaiRegex string = "([ \\t\\n\\r]|^)\\d{4,}([ \\t\\n\\r]|$)" isNhentai, err := regexp.MatchString(nhentaiRegex, update.Message.Text) if err != nil { log.Panicf("Failed to compile regex for nhentai", err) diff --git a/text/nhentai/nhentai.go b/text/nhentai/nhentai.go index 08294e6..9c26290 100644 --- a/text/nhentai/nhentai.go +++ b/text/nhentai/nhentai.go @@ -12,7 +12,7 @@ import ( func Nhentai(regex string, update tgbotapi.Update, bot *tgbotapi.BotAPI) { re := regexp.MustCompile(regex) - getdigit := regexp.MustCompile("\\d{2,}") + getdigit := regexp.MustCompile("\\d{4,}") match := re.FindStringSubmatch(update.Message.Text) hentainumber := getdigit.FindStringSubmatch(match[0])