 
                     if  matched  {
                         // We have some kind of capture for this path element
-                        regexStr.appendContentsOf("/")
-                        regexStr.appendContentsOf(prefix)
-
-                        regexStr.appendContentsOf("(?:(")
-                        regexStr.appendContentsOf(matchExp!)
-                        regexStr.appendContentsOf("))")
+                        // Build the runtime regex depending on whether or not there is "repetition"
+                        switch(plusQuestStar) {
+                            case "+":
+                                regexStr.appendContentsOf("/")
+                                regexStr.appendContentsOf(prefix)
+                                regexStr.appendContentsOf("(")
+                                regexStr.appendContentsOf(matchExp)
+                                regexStr.appendContentsOf("(?:/")
+                                regexStr.appendContentsOf(matchExp)
+                                regexStr.appendContentsOf(")*)")
+                            case "?":
+                                if  prefix.isEmpty  {
+                                    regexStr.appendContentsOf("(?:/(")
+                                    regexStr.appendContentsOf(matchExp)
+                                    regexStr.appendContentsOf("))?")
+                                }
+                                else {
+                                    regexStr.appendContentsOf("/")
+                                    regexStr.appendContentsOf(prefix)
+                                    regexStr.appendContentsOf("(?:(")
+                                    regexStr.appendContentsOf(matchExp)
+                                    regexStr.appendContentsOf("))?")
+                                }
+                            case "*":
+                                if  prefix.isEmpty  {
+                                    regexStr.appendContentsOf("(?:/(")
+                                    regexStr.appendContentsOf(matchExp)
+                                    regexStr.appendContentsOf("(?:/")
+                                    regexStr.appendContentsOf(matchExp)
+                                    regexStr.appendContentsOf(")*))?")
+                                }
+                                else {
+                                    regexStr.appendContentsOf("/")
+                                    regexStr.appendContentsOf(prefix)
+                                    regexStr.appendContentsOf("(?:(")
+                                    regexStr.appendContentsOf(matchExp)
+                                    regexStr.appendContentsOf("(?:/")
+                                    regexStr.appendContentsOf(matchExp)
+                                    regexStr.appendContentsOf(")*))?")
+                                }
+                            default:
+                                regexStr.appendContentsOf("/")
+                                regexStr.appendContentsOf(prefix)
+                                regexStr.appendContentsOf("(?:(")
+                                regexStr.appendContentsOf(matchExp)
+                                regexStr.appendContentsOf("))")
+                        }
                     }
                     else {
                         // A path element with no capture

                        matched = true
                    }
                    else {
                        //var plusQuestStar: String?
                        let range = NSMakeRange(0, path.characters.count)
                        if  let keyMatch = RouterElement.keyRegex!.firstMatchInString(path, options: [], range: range)  {
                            // We found a path element with a named/key capture

                    }
                }
            }
            regexStr.appendContentsOf("(?:/(?=$))?$")

            var regex: NSRegularExpression? = nil
            do {
