diff --git a/shoptimizer_api/constants.py b/shoptimizer_api/constants.py index 4d85cd8..2451229 100644 --- a/shoptimizer_api/constants.py +++ b/shoptimizer_api/constants.py @@ -56,9 +56,9 @@ MAX_COLOR_STR_LENGTH_FOR_EACH: int = 40 MAX_COLOR_STR_LENGTH_IN_TOTAL: int = 100 -CLOTHING_SIZES_CHARS_SLASH_SEPARATOR = r'((([0-9]{1,3})?[X]*(\bS{1,2})\b)?\/?){0,10}(\bM{1}\b)?\/?(\b(([0-9]{1,3})?[X]*(\bL{1,2})\b)?\/?){0,10}' +CLOTHING_SIZES_CHARS_SLASH_SEPARATOR = r'(\b([0-9]{1,3})?(X{0,3})(S{1,2})\b|\bM{1}\b|\b([0-9]{1,3})?(X{0,2})(L{1,2})\b)(\/(([0-9]{1,3})?(X{0,3})(S{1,2})\b|M{1}\b|([0-9]{1,3})?(X{0,2})(L{1,2})\b))*' CLOTHING_SIZES_CHARS_REGEX_RANGE = r'((\b([0-9]{1,3})?[X]*(S{1,2}\b)?(\bM{1}\b)?\b([0-9]{1,3})?[X]*(L{1,2}\b)?)(-(\b([0-9]{1,3})?[X]*(S{1,2}\b)?(\bM{1}\b)?\b([0-9]{1,3})?[X]*(L{1,2})?))?)' -CLOTHING_SIZES_REGEX_WORDS = r'((X|EXTRA)?[\s|-]?SMALL\/?\b|(X|EXTRA)?[\s|-]?MEDIUM\/?\b|(X|EXTRA)?[\s|-]?LARGE\/?\b|OSFA\/?\b|OS\/?\b)' +CLOTHING_SIZES_REGEX_WORDS = r'((X|EXTRA)?[\s|-]?SMALL\/?\b|(X|EXTRA)?[\s|-]?MEDIUM\/?\b|(X|EXTRA)?[\s|-]?LARGE\/?\b|OSFA\/?\b|\bOS\/?\b)' CLOTHING_SIZES_JA: Tuple[str, ...] = ('XXS', 'XS', 'S', 'M', 'L', 'LL', 'XL', 'XXL') CLOTHING_SIZES_KO: Tuple[str, ...] = ('XXS', 'XS', 'S', 'M', 'L', 'XL', 'XXL')