Using c# I am trying to use regular expressions to get the value of a piece of text that appears after a colon. I know the field name, but there is a following colon that is in a variable position. The value would end at the next whitespace.
Thus:
KnownFieldName : Value
I'd then like to place the value into a group.
I've found a number of similar questions but none that actually points me in the direction of solving this.
This is part of a larger piece of code, but basically it fits in here:
foreach (var v in fieldsToParse)
{
var match = Regex.Match(line, v.pattern, RegexOptions.IgnorePatternWhitespace);
if (match.Success)
v.value = match.Groups[v.name].Value;
}