I have the following regex
\b(?!^;#)\w+\s*\w+\|\b
and this sample string.
-1;#Class Study|0b4dac95-9e17-4af9-b849-6d283a99b561;#-1;#Matrix|dda77641-7b25-40f9-bb65-a0bca13776d3";
I need to just match the label which comes after the ;#
string multipleFieldValue = "-1;#Class Study|0b4dac95-9e17-4af9-b849-6d283a99b561;#-1;#Matrix|dda77641-7b25-40f9-bb65-a0bca13776d3";
var regex = new Regex(@"\b(?!^;#)\w+\s*\w+\|\b");
string[] labels = multipleFieldValue.Split(new[] { ";#" },StringSplitOptions.None );
var matches = regex.Matches(multipleFieldValue);
Assert.AreEqual(2, matches.Count);
currently this returns the label but also returns the | I want to eliminate the | as well