I've to detect and extract from a string a repeating group of characters and list one part of each captured group.
Here is an example of string to parse: "za e eStartGood1Endds qStartGood2Endsds df"
My Regex is: ".*?(?::Start(.+)End.*?)+"
Expecting groups captured expected: Good1, Good2, etc
My Regex capture is wrong: it seems that (?::Start(.+) is considered as group to capture...
May I miss something? Thanks!
Start(.*?)End. No idea what your input really looks like. Have you got actual asterisks there or is it formatting?Regex.Matches.Regex.Matches(input, @"Start(.*?)End").Cast<Match>().Select(p => p.Groups[1].Value).ToList();