diff --git a/lib/mongo/util/uri_parser.rb b/lib/mongo/util/uri_parser.rb index db648c6..c5a43bd 100644 --- a/lib/mongo/util/uri_parser.rb +++ b/lib/mongo/util/uri_parser.rb @@ -26,7 +26,7 @@ module Mongo AUTH_REGEX = /(?#{USER_REGEX}:#{PASS_REGEX}@)?/ HOST_REGEX = /(?[-.\w]+)/ - PORT_REGEX = /(?::(?\d+))?/ + PORT_REGEX = /(?::(?\w+))?/ NODE_REGEX = /((?#{HOST_REGEX}#{PORT_REGEX},?)+)/ PATH_REGEX = /(?:\/(?[-\w]+))?/