() is also a valid delimiter
This commit is contained in:
parent
7ac17be3ae
commit
b7519c7727
@ -65,7 +65,11 @@ class Regex implements ValueInterface
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user