vendredi 29 septembre 2017

C# recognize number pattern in string

I need a regular expression to check if a number pattern exists within a string. I want to check if a string contains for example 4 sequenced numbers

Frame0001
Frame_0001
Frame_0001_1
Frame_0001(1)
Frame_0001_AA

Result should be 0001 for each of the strings.

Examples which do NOT match pattern would be Frame01 or Frame_01 e.g.

Thanks for any assistance.

best regards, Mark

Aucun commentaire:

Enregistrer un commentaire