Skip to content

Instantly share code, notes, and snippets.

@ungood
Created October 28, 2011 21:36
Show Gist options
  • Select an option

  • Save ungood/1323632 to your computer and use it in GitHub Desktop.

Select an option

Save ungood/1323632 to your computer and use it in GitHub Desktop.
Simple parsing regex
var r = new Regex(@"^(?<property>[\w]+):(?<error>.+)$", RegexOptions.Multiline);
var lookup = r.Matches("xyz").Cast<Match>().ToLookup(
=> m.Groups["property"].Value,
=> m.Groups["error"].Value);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment