I have the following regex code:
@"(N[0-9][EHPULMAVRYGBWK123670]{4}[N]{1}PF[0]{1}[0-9]{1})";
The [EHPULMAVRYGBWK123670] within the regex refer to specific button types or colours.
There are four buttons in total, and the order they are in the part number denotes the order that they are in the product (from top left to top right).
For example if the part number contained:
RGBY - Red (Top Left), Green (Top Right), Blue (Bottom Left), Yellow (Bottom Right)
GBYR - Green (Top Left), Blue (Top Right), Yellow (Bottom Left), Red (Bottom Right)
After the buttons, there is always the letter N, and a PF number.
What I want to do is extract the 4 letter combination for the colors. The {4} in the regex is what captures those letters. I then needs to make a decision based on the order of the letters.
How would I go about doing this?
save this regex in a stringwhich you are talking about?{4}in the regex is, I believe, what captures those letters. He then needs to make a decision based on the order of the letters.[N]{1}is also justN