Not sure if you still need this, but this is the solution i came up with:
Regex regex = new Regex ( @"^([d-])([rwxt-]{3}){3}\s+\d{1,}\s+.*?(\d{1,})\s+(\w+\s+\d{1,2}\s+(?:\d{4})?)(\d{1,2}:\d{2})?\s+(.+?)\s?$",
RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace );
Match Groups:
- object type:
- d : directory
- – : file
- Array[3] of permissions (rwx-)
- File Size
- Last Modified Date
- Last Modified Time
- File/Directory Name