This problem is about separating a string representing a product identifier into three components.
- The first part consists of upper and lower letters of arbitrary length which represents the warehouse.
- The second part is digits which represents the product number. This part is also of arbitrary length.
- The last part is qualifiers as size and colours, and this part continues to the end of the string. The qualifiers are guaranteed to start with a capital letter and consist of alphanumeric characters.
Each part should be printed clearly separated. It is guaranteed that each part is non-empty.
The winner is the one who uses least bytes to solve this problem.
Example:
Input: UK7898S14
Output:
UK
7898
S14
Here UK is United Kingdom, 7898 is the product code, and S14 is size 14.
Example 2:
Input: cphDK1234CYELLOWS14QGOOD
Output:
cphDK
1234
CYELLOWS14QGOOD
Here cphDK is Copenhagen, Denmark, 1234 is the product code, CYELLOWS14QGOOD represents yellow colour, size 14, and good quality.