Created
October 28, 2011 21:36
-
-
Save ungood/1323632 to your computer and use it in GitHub Desktop.
Simple parsing regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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