small change to regex

This commit is contained in:
Tyler Brock 2011-12-20 16:02:17 -05:00
parent 899241eefe
commit d79ca1f994

View File

@ -26,7 +26,7 @@ module Mongo
AUTH_REGEX = /(?<auth>#{USER_REGEX}:#{PASS_REGEX}@)?/ AUTH_REGEX = /(?<auth>#{USER_REGEX}:#{PASS_REGEX}@)?/
HOST_REGEX = /(?<host>[-.\w]+)/ HOST_REGEX = /(?<host>[-.\w]+)/
PORT_REGEX = /(?::(?<port>\d+))?/ PORT_REGEX = /(?::(?<port>\w+))?/
NODE_REGEX = /((?<nodes>#{HOST_REGEX}#{PORT_REGEX},?)+)/ NODE_REGEX = /((?<nodes>#{HOST_REGEX}#{PORT_REGEX},?)+)/
PATH_REGEX = /(?:\/(?<path>[-\w]+))?/ PATH_REGEX = /(?:\/(?<path>[-\w]+))?/