diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-02-15 17:24:52 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-02-15 17:24:52 +0000 |
commit | 6642e2b43c6ca135b91b25ce9ad80a45e6a4267e (patch) | |
tree | 100f6d5cb2ea5d93d59368c88e6636401f4cf354 /lib/rbot | |
parent | cba46be94c0b711b6aa0709140b08ef541a345bb (diff) |
Regexp: IP address regexps where missing an octet
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/core/utils/extends.rb | 6 |
1 files 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 |