Re: Help: Validate Domain Name by Regular Express

From: Date: Tue, 18 Jan 2011 09:18:21 +0000
Subject: Re: Help: Validate Domain Name by Regular Express
References: 1  Groups: php.general php.general 
Request: Send a blank email to php-general+get-310829@lists.php.net to get a copy of this message
On 01/08/2011 04:55 PM, WalkinRaven wrote:
PHP 5.3 PCRE Regular Express to match domain names format according to RFC 1034 - DOMAIN NAMES - CONCEPTS AND FACILITIES /^ ( [a-z] | [a-z] (?:[a-z]|[0-9]) | [a-z] (?:[a-z]|[0-9]|\-){1,61} (?:[a-z]|[0-9]) ) # One label (?:\.(?1))*+ # More labels \.? # Root domain name $/iDx This rule matches only <label> and <label>. but not <label>.<label>... I don't know what wrong with it. Thank you.
Thank you all, and I think I've found the problem: If you don't use 'Recursive Reference' feature, all will work well. Detail: http://ndss.walkinraven.name/2011/01/bug-related-to-recursive-reference-in.html

« previous php.general (#310829) next »