From: Fabien Potencier Date: Tue, 29 Jul 2014 11:54:16 +0000 (+0200) Subject: minor #1457 Fixed the `matches` operator code example (brandonkelly) X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=4134169b67e692107b385af857b526e6013361ce;p=web%2Fkonrad%2Ftwig.git minor #1457 Fixed the `matches` operator code example (brandonkelly) This PR was merged into the 1.16-dev branch. Discussion ---------- Fixed the `matches` operator code example A customer just pointed out that your `matches` operator code example wasn't working for them, and it ended up being because its backslashes themselves needed to be escaped by additional backslashes. (I've verified this.) While I was editing it, I also switched to forwardslash delimiters on the regex, since those are much more commonly used than curly brackets. (I hadn't even been aware that curly brackets are allowed.) To back that assertion up, [PHP's official preg_quote() docs](http://php.net/manual/en/function.preg-quote.php) state: > The `/` is the most commonly used delimiter. Commits ------- 33dcbc8 Fixed the `matches` operator code example --- 4134169b67e692107b385af857b526e6013361ce