Try another pattern:
@"(?i)\](\d*[A-Z])(.*?)\["
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I have this string. scanned=
[)>[RS]06[GS]PTVK1281257[GS]21P666[GS]11D201632[GS]Q60[GS]18VLMDM5[GS]1TAFJH0010-1[GS]13E5a[GS]1PW12R789B[GS]4LCN[GS][RS][EOT]]
With.
Dictionary<string, string> results =
Regex.Matches(scanned, @"(?i)\](\d*[A-Z])(.+?)\[").Cast<Match>().ToDictionary(m => m.Groups[1].Value, m => m.Groups[2].Value);
System.Diagnostics.Trace.WriteLine(scanned);
Works not with
[)>[RS]06[GS]PTVK1281257[GS]21P[GS]11D201632[GS]Q60[GS]18VLMDM5[GS]1TAFJH0010-1[GS]13E5a[GS]1PW12R789B[GS]4LCN[GS][RS][EOT]]
2P Prefix is wrong.
Can somebody help me, see the mistake for RegEx? Thanks in advance.
Problems, when the value is empty.
Try another pattern:
@"(?i)\](\d*[A-Z])(.*?)\["