Skip to content

Commit

Permalink
Tweak previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Apr 9, 2022
1 parent 6860ca1 commit ab36653
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,7 @@ Comparisons
The following comparison operators are supported in any expression: ``==``,
``!=``, ``<``, ``>``, ``>=``, and ``<=``.

You can also check if a string ``starts with`` or ``ends with`` another
string:
Check if a string ``starts with`` or ``ends with`` another string:

.. code-block:: twig
Expand All @@ -654,6 +653,9 @@ string:
{% if 'Fabien' ends with 'n' %}
{% endif %}
Check that a string contains another string via the containment operator (see
next section).

.. note::

For complex string comparisons, the ``matches`` operator allows you to use
Expand All @@ -664,8 +666,6 @@ string:
{% if phone matches '/^[\\d\\.]+$/' %}
{% endif %}
For simple string comparisons, the containment operator can be used.

Containment Operator
~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit ab36653

Please sign in to comment.