diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/Segment.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/Segment.php
index 6c64a96e792f52c29b1e4409578560ee49c2a479..62548d61940fa2134ec01fc4d2f0e2dec0f48e19 100644
--- a/vendor/ZF2/library/Zend/Mvc/Router/Http/Segment.php
+++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/Segment.php
@@ -316,9 +316,11 @@ class Segment implements RouteInterface
         $path = $uri->getPath();
 
         if ($pathOffset !== null) {
-            $result = preg_match('(\G' . $this->regex . ')', $path, $matches, null, $pathOffset);
+            $pattern = '/(\G' . str_replace('/', '\/', $this->regex) . ')/i';
+            $result = preg_match($pattern, $path, $matches, null, $pathOffset);
         } else {
-            $result = preg_match('(^' . $this->regex . '$)', $path, $matches);
+            $pattern = '/(^' . str_replace('/', '\/', $this->regex) . '$)/i';
+            $result = preg_match('(^' . $pattern . '$)', $path, $matches);
         }
 
         if (!$result) {