diff --git a/server/resource/internal/logic/resourcebackuplogic.go b/server/resource/internal/logic/resourcebackuplogic.go index b0b63fff..d12ffc09 100644 --- a/server/resource/internal/logic/resourcebackuplogic.go +++ b/server/resource/internal/logic/resourcebackuplogic.go @@ -149,7 +149,7 @@ func (l *ResourceBackupLogic) ResourceBackup(req *types.ResourceBackupReq, useri func regexStr(unquotedStr string, urls *map[string]string) error { // 创建一个正则表达式 - regex := regexp.MustCompile(`"https:\\/\\/s3\.(.*?)"`) + regex := regexp.MustCompile(`"https:\\/\\/s3|https://s3\.(.*?)"`) // 查找符合正则表达式的字符串 matches := regex.FindAllString(unquotedStr, -1) var urlsData = *urls @@ -162,7 +162,7 @@ func regexStr(unquotedStr string, urls *map[string]string) error { urlsData[s3url_to_s3id.GetS3ResourceIdFormUrl(matchStr)] = matchStr } - regex02 := regexp.MustCompile(`"https:\\/\\/fusenstorage\.s3\.(.*?)"`) + regex02 := regexp.MustCompile(`"https:\\/\\/fusenstorage\.s3|https://fusenstorage.s3\.(.*?)"`) // 查找符合正则表达式的字符串 matches02 := regex02.FindAllString(unquotedStr, -1) // 打印匹配到的字符串