I have regular expression (?!\,)(?!X){3}[0-9\.\w\s\+\-\:\,]+
and strings like
"1", "S1", "S2", "1", "2"
"1", "S1", "S2", "1", 2
"1", "S1", "S2", "1", "2", 3
I am trying to parse that string with Regex (by matches) and I am not strong in regular expressions.
I need to process elements "1", "S1", "S2"
and to skip elements "1", "2"
. The first idea is to specify in regular expression logic like "don't take occururences, that are first from right ("2"-2) and second from right ("1"-1), but take all other occurences".
The main idea is that this logic should be made with only regular expression, not by C# code (I am talking about Match object position in C# matches array - no C# logic, regular expression should be used only).
How can I change my regular expression (?!\,)(?!X){3}[0-9\.\w\s\+\-\:\,]+
to specify positions, that are should not be processed?