Fixed the matches operator code example

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.
This commit is contained in:
Brandon Kelly
2014-07-28 11:33:46 -07:00
parent 7d1577ff3c
commit 33dcbc8c76
+1 -1
View File
@@ -693,7 +693,7 @@ string:
.. code-block:: jinja
{% if phone matches '{^[\d\.]+$}' %}
{% if phone matches '/^[\\d\\.]+$/' %}
{% endif %}
Containment Operator