jeudi 22 septembre 2016

Extract "Red" "Blue" "Circle" "Black" from "RedBlueCircleBlack" using capital as delimiter?

Is this a RegEx problem?

To note: there will always be only four items, each starts with a capital letter, each will be in order (color,color,shape,color): "BlackWhiteTriangleGreen" etc.

So,

    a="BlackWhiteTriangleGreen"  

yields:

    c1 = "Black"  
    c2 = "White"  
    S = "Triangle"  
    c3 = "Green"

Aucun commentaire:

Enregistrer un commentaire