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