Regex: parsing a linux ftp list string. result is a list of several groups like : dir (-,l,d) p...

Posted by: RegexLib.com - Recent Patterns, on 26 Jul 2005 | View original | Bookmarked: 0 time(s)

Regex: parsing a linux ftp list string. result is a list of several groups like : dir (-,l,d) permission (lrwxrwxrwx) filecode (any number) owner (what it says - number or text) group (same as owner) timestamp (what it says, including groups like day, month, hour, minute) name (the file, directory or linkname)

*********************************************

^((<dir>[\-ld])(<permission>([\-r][\-w][\-xs]){3})\s+(<filecode>\d+)\s+(<owner>\w+)\s+(<group>\w+)\s+(<size>\d+)\s+(<timestamp>(<year>\d{4})-(<month>\d{2})-(<day>\d\d)\s+(<hour>\d{2}):(<minute>\d{2}))\s+(<name>\w.+))$

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Regex | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2212 | Hits: 27

Similar Posts

  • LINQ Tip of the week: System.String support more
  • ORM Release History : Q1 2009 SP1 (version 2009.1.405.1) more
  • Using Enums in List Controls more
  • Linq-a-fi your file system by creating your own DSL more
  • Very Simple .NET Thumbnail Creation Code more
  • String manipulation tricks more
  • HttpHandler To Assist In Preventing Image Leeching more
  • Comparing Strings in NUnit 2.2 versus NUnit 2.4 more
  • How many ways to do a String Replace? more
  • Refactoring: Using object constructors in HQL with NHibernate more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD