summaryrefslogtreecommitdiff
path: root/types/compat
diff options
context:
space:
mode:
Diffstat (limited to 'types/compat')
-rw-r--r--types/compat/ipv4.pp2
1 files changed, 1 insertions, 1 deletions
diff --git a/types/compat/ipv4.pp b/types/compat/ipv4.pp
index 1d72ebd..a0ba0d6 100644
--- a/types/compat/ipv4.pp
+++ b/types/compat/ipv4.pp
@@ -1,2 +1,2 @@
# Emulate the validate_ipv4_address and is_ipv4_address functions
-type Stdlib::Compat::Ipv4 = Pattern[/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/]
+type Stdlib::Compat::Ipv4 = Pattern[/^((([0-9](?!\d)|[1-9][0-9](?!\d)|1[0-9]{2}(?!\d)|2[0-4][0-9](?!\d)|25[0-5](?!\d))[.]){3}([0-9](?!\d)|[1-9][0-9](?!\d)|1[0-9]{2}(?!\d)|2[0-4][0-9](?!\d)|25[0-5](?!\d)))(\/((([0-9](?!\d)|[1-9][0-9](?!\d)|1[0-9]{2}(?!\d)|2[0-4][0-9](?!\d)|25[0-5](?!\d))[.]){3}([0-9](?!\d)|[1-9][0-9](?!\d)|1[0-9]{2}(?!\d)|2[0-4][0-9](?!\d)|25[0-5](?!\d))|[0-9]+))?$/]