From 6642e2b43c6ca135b91b25ce9ad80a45e6a4267e Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 15 Feb 2007 17:24:52 +0000 Subject: Regexp: IP address regexps where missing an octet --- lib/rbot/core/utils/extends.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rbot/core/utils/extends.rb b/lib/rbot/core/utils/extends.rb index b2b4f595..44487e0d 100644 --- a/lib/rbot/core/utils/extends.rb +++ b/lib/rbot/core/utils/extends.rb @@ -133,9 +133,9 @@ class ::Regexp HEX_DIGITS = /#{HEX_DIGIT}+/ HEX_OCTET = /#{HEX_DIGIT}#{HEX_DIGIT}?/ DEC_OCTET = /[01]?\d?\d|2[0-4]\d|25[0-5]/ - DEC_IP = /#{DEC_OCTET}.#{DEC_OCTET}.#{DEC_OCTET}/ - HEX_IP = /#{HEX_OCTET}.#{HEX_OCTET}.#{HEX_OCTET}/ - IP = /#{DEC_IP}|#{HEX_IP}/ + DEC_IP_ADDR = /#{DEC_OCTET}.#{DEC_OCTET}.#{DEC_OCTET}.#{DEC_OCTET}/ + HEX_IP_ADDR = /#{HEX_OCTET}.#{HEX_OCTET}.#{HEX_OCTET}.#{HEX_OCTET}/ + IP_ADDR = /#{DEC_IP_ADDR}|#{HEX_IP_ADDR}/ end -- cgit v1.2.3