From 0d8a305d61aacaa0ee94374d3a26b531be28a09c Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Fri, 30 May 2014 00:45:37 +0200 Subject: Update regex for matching FQDN. --- utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils.php') diff --git a/utils.php b/utils.php index 6baafb8..e622642 100644 --- a/utils.php +++ b/utils.php @@ -28,7 +28,7 @@ function match_ipv6($ip) { } function match_fqdn($fqdn) { - $regex = '/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/'; + $regex = '/(?=^.{4,255}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?