EAN128 ou GS1-128 décoder c#

Voici un exemple de EAN128 ou nouveau nom GS1-128 barcode

01088888931021461712031510W1040190

Je veux décoder ais

(01)08888893102146

(17)120315

(10)W1040190

Mais le code à barres peut être changé comme ce

1712031510W1040190

(17)120315

(10)W1040190

est-il possible façons de le résoudre avec la regex ou quelle est la meilleure façon

Maintenant, je suis en train d'essayer cette

public String AICodes(String pAI)
    {
        switch (pAI)
        {
            case "01":
                return "01\\d{14}";
            case "17":
                return "17\\d{6}";
            case "10":
                return "17\\d{6}10[a-zA-Z0-9|]{1,20}";
        }
        return String.Empty;
    }

private void GS1DataConvert(string pBarcode, string pBarfnc)
    {
       Match match = Regex.Match(pBarcode, AICodes(pBarfnc));
        if (match.Success)
        {
            MessageBox.Show(match.Groups[0].Value);
        }
    }

string barfnc = "01";

GS1DataConvert(barcode, barfnc);
barfnc = "17";
GS1DataConvert(barcode, barfnc);
barfnc = "10";
GS1DataConvert(barcode, barfnc);
InformationsquelleAutor Murat Vezir | 2012-03-15