mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 04:16:28 +00:00
minor #3676 [Documentation] Add note about simple string matching (Kern046)
This PR was merged into the 2.x branch.
Discussion
----------
[Documentation] Add note about simple string matching
During the Symfony Live we mentionned the need to update the documentation around string matching to mention that an approach was possible with the ``ìn`` operator was simpler.
As the documentation part about ``in`` was just below, I wasn't sure that an anchor link was relevant, nor a code example.
Happy to make this first tiny contribution, and available if there are more stuff to do for this PR :).
Commits
-------
5e26ce73 [Documentation] Add note about simple string matching
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