mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 12:37:15 +00:00
[Documentation] Add note about simple string matching
Mention the use of ``in`` operator when looking for a simple string instead of ``matches``. #Symfony_Live
This commit is contained in:
@@ -664,6 +664,8 @@ string:
|
||||
{% if phone matches '/^[\\d\\.]+$/' %}
|
||||
{% endif %}
|
||||
|
||||
For simple string comparisons, the containment operator can be used.
|
||||
|
||||
Containment Operator
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user