I have a single line of text which may contain 1 or more matches. I am using named capture groups since I am continuously changing things around, and this makes it easier.
String:
blah blah blah dasf{{optionA:B4}}t estsdf{{optionB:B4}}sadf{{optionB:B4}}sadf13
Pattern:
(?<choice>\{\{(?<c>optionA|optionB):(?<d>[A-Z]\d{1,2})\}\})
Every example I can find online which deals with this type of structure doesn't use named capture groups, and I haven't been able to puzzle it together myself.
In my example scenario, there are 3 matches, and for each match, I want to be able to access the content of the 'choice', 'c' and 'd' capture groups.
Can someone show me a simple example of how to do this?