diff --git a/business/jxutils/jxutils.go b/business/jxutils/jxutils.go index 149438c4c..c28ce415e 100644 --- a/business/jxutils/jxutils.go +++ b/business/jxutils/jxutils.go @@ -71,7 +71,7 @@ func init() { // Go regex does not support lookarounds. // https://stackoverflow.com/questions/38933898/error-parsing-regexp-invalid-or-unsupported-perl-syntax - skuNamePat = regexp.MustCompile(`([\((\[【][^\((\[【\))\]】]*[\))\]】])?(.*?)([((].*[))])?\s*约?([1-9][\d\.]*)(g|G|kg|kG|Kg|KG|l|L|ml|mL|Ml|ML|克)\s*([((].*[))])?\s*(?:\/|/|)\s*([^\s()()]{0,2})\s*([((].*[))])?$`) + skuNamePat = regexp.MustCompile(`([\((\[【][^\((\[【\))\]】]*[\))\]】])?(.*?)([((].*[))])?\s*约?([1-9][\d\.]*)(g|G|kg|kG|Kg|KG|l|L|ml|mL|Ml|ML|克)\s*([((].*[))])?\s*(?:\/|/|)\s*([^\s()()]{0,2})(\s.*)?$\s*([((].*[))])?$`) emailPat = regexp.MustCompile(`[A-Za-z0-9_\-.]+@(?:[A-Za-z0-9_\-]+\.)+[A-Za-z]+`) } @@ -419,6 +419,8 @@ func SplitSkuName(skuName string) (prefix, name, comment, specUnit, unit string, comment = searchResult[6] } else if searchResult[8] != "" { comment = searchResult[8] + } else if searchResult[9] != "" { + comment = searchResult[9] } comment = TrimDecorationChar(comment) name = TrimDecorationChar(searchResult[2])