Sample data: !!Part|123456,ABCDEF,ABC132!!
The comma delimited list can be any number of any combination of alphas and numbers
I want a regex to match the entri
The following code
string testString = "!!Part|123456,ABCDEF,ABC132!!";
foreach(string component in testString.Split("|!,".ToCharArray(),StringSplitOptions.RemoveEmptyEntries) )
{
Console.WriteLine(component);
}
will give the following output
Part
123456
ABCDEF
ABC132
This has the advantage of making the comma separated part of the string match up with the index numbers you (possibly accidentally incorrectly) specified in the original question (1,2,3).
HTH
-EDIT- forgot to mention, this may have drawbacks if the format of each string is not as expected above, but then again it would break just as easily without stupendously complex regex too.