Regex: Validates MS FQDNs. 1) Entire fqdn less than 255 chars. 2) Host and domain names may cont...

Posted by: RegexLib.com - Recent Patterns, on 11 Jan 2006 | View original | Bookmarked: 0 time(s)

Regex: Validates MS FQDNs. 1) Entire fqdn less than 255 chars. 2) Host and domain names may contain an underscore. 3) 1st char can be a number. 4) No part can be all numbers. 5) Allows any TLD Works in C#. Based on Remi Sabourin's regex

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

(?=^.{1,254}$)(^(?:(?!\d+\.)[a-zA-Z0-9_\-]{1,63}\.?)+(?:[a-zA-Z]{2,})$)

Category: Regex | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 5785 | Hits: 32

Similar Posts

  • Windows Server 2008 + SQL Server 2008: Really better together. more
  • WPF Presence Controls for Office Communicator 2007 more
  • What is Scalability? Do I have Extreme Requirements? more
  • HttpHandler To Assist In Preventing Image Leeching more
  • FQDN Validation more
  • CS Dev Guide: Add new page or user control to Control Panel 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