projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
7d1577f
)
Fixed the `matches` operator code example
author
Brandon Kelly
<brandon@pixelandtonic.com>
Mon, 28 Jul 2014 18:33:46 +0000 (11:33 -0700)
committer
Brandon Kelly
<brandon@pixelandtonic.com>
Mon, 28 Jul 2014 18:37:46 +0000 (11:37 -0700)
It wasn't working because the backslashes themselves needed to be escaped by additional backslashes. Also switched to using forwardslashes for the regex delimiters rather than curly brackets.
doc/templates.rst
patch
|
blob
|
history
diff --git
a/doc/templates.rst
b/doc/templates.rst
index
aff036d
..
82b6f0c
100644
(file)
--- a/
doc/templates.rst
+++ b/
doc/templates.rst
@@
-693,7
+693,7
@@
string:
.. code-block:: jinja
- {% if phone matches '{^[\d\.]+$}' %}
+ {% if phone matches '/^[\\d\\.]+$/' %}
{% endif %}
Containment Operator