Created
June 24, 2014 19:10
-
-
Save nramsbottom/fadf501734eadd2b11c2 to your computer and use it in GitHub Desktop.
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
| private static string GetCharacterNameFromSkyrimSaveFileName(string filename) | |
| { | |
| var re = new Regex(@"save \d+ - (?<charname>[\w]+)\s+([\w\s])+\s+\d{2}\.\d{2}.\d{2}", RegexOptions.IgnoreCase); | |
| var m = re.Match(Path.GetFileName(filename)); | |
| return m.Success ? m.Groups["charname"].Value : null; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment