From 6f248783bdecf6a49bb37853936a95db61964b59 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 25 Jul 2024 11:12:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E9=93=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chain_transfer/turn_chain.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/chain_transfer/turn_chain.go b/chain_transfer/turn_chain.go index 2fed092..57bb35c 100644 --- a/chain_transfer/turn_chain.go +++ b/chain_transfer/turn_chain.go @@ -128,7 +128,7 @@ func TurnChain(eg *xorm.Engine, officialEg, zhimengEg *xorm.Engine, args map[str for _, v := range replaceAll { reqCount2 = strings.ReplaceAll(reqCount2, v, "") } - split1 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{6,15}").FindAllString(reqCount2, -1) + split1 := regexp.MustCompile("[a-zA-Z0-9]{4,15} [a-zA-Z0-9]{6,15}").FindAllString(reqCount2, -1) split3 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{4,6}").FindAllString(reqCount2, -1) split2 := regexp.MustCompile("[a-zA-Z0-9]{6,15}").FindAllString(reqCount2, -1) if strings.Contains(reqCount2, "http") { @@ -150,7 +150,7 @@ func TurnChain(eg *xorm.Engine, officialEg, zhimengEg *xorm.Engine, args map[str for _, v2 := range replaceAll { repV = strings.ReplaceAll(repV, v2, "") } - split1 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{6,15}").FindAllString(repV, -1) + split1 := regexp.MustCompile("[a-zA-Z0-9]{4,15} [a-zA-Z0-9]{6,15}").FindAllString(repV, -1) split3 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{4,6}").FindAllString(repV, -1) split2 := regexp.MustCompile("[a-zA-Z0-9]{6,15}").FindAllString(repV, -1) if strings.Contains(repV, "http") { @@ -170,7 +170,11 @@ func TurnChain(eg *xorm.Engine, officialEg, zhimengEg *xorm.Engine, args map[str if len(split3) > 0 || len(split1) > 0 { split5 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{6,15}").FindAllString(v, -1) split6 := regexp.MustCompile("[a-zA-Z0-9]{6,15} [a-zA-Z0-9]{4,6}").FindAllString(v, -1) - if len(split5) == 0 && len(split6) == 0 { + split7 := regexp.MustCompile("[a-zA-Z0-9]{4,15}/ [a-zA-Z0-9]{6,15}").FindAllString(v, -1) + split8 := regexp.MustCompile("[a-zA-Z0-9]{6,15}/ [a-zA-Z0-9]{4,6}").FindAllString(v, -1) + if len(split7) > 0 || len(split8) > 0 || len(split5) == 0 || len(split6) == 0 { + //占位 + } else if len(split5) == 0 && len(split6) == 0 { split4 := regexp.MustCompile("[a-zA-Z0-9]{8,15}").FindAllString(repV, -1) v = split4[0] } else {