Jasny\Twig\PcreExtension::assertNoEval PHP Метод

assertNoEval() защищенный Метод

Check that the regex doesn't use the eval modifier
protected assertNoEval ( string $pattern )
$pattern string
    protected function assertNoEval($pattern)
    {
        if (preg_match('/(.).*\\1(.+)$/', trim($pattern), $match) && strpos($match[1], 'e') !== false) {
            throw new \Exception("Using the eval modifier for regular expressions is not allowed");
        }
    }