Skip to content
Browse files

() is also a valid delimiter

  • Loading branch information...
1 parent c39a28f commit df41b68d0795949c6edcf3fb331c8147b7cc4201 @WouterJ WouterJ committed Feb 20, 2014
Showing with 5 additions and 1 deletion.
  1. +5 −1 Expression/Regex.php
View
6 Expression/Regex.php
@@ -65,7 +65,11 @@ public static function create($expr)
$start = substr($m[1], 0, 1);
$end = substr($m[1], -1);
- if (($start === $end && !preg_match('/[*?[:alnum:] \\\\]/', $start)) || ($start === '{' && $end === '}')) {
+ if (
+ ($start === $end && !preg_match('/[*?[:alnum:] \\\\]/', $start))
+ || ($start === '{' && $end === '}')
+ || ($start === '(' && $end === ')')
+ ) {
return new self(substr($m[1], 1, -1), $m[2], $end);
}
}

0 comments on commit df41b68

Please sign in to comment.
Something went wrong with that request. Please try again.