Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1cc5925

Browse files
cordovalweaverryan
authored andcommitted
add parenthesis in the example to correct precendence
1 parent881477c commit1cc5925

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎components/expression_language/syntax.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ Comparison Operators
176176
To test if a string does *not* match a regex, use the logical ``not``
177177
operator in combination with the ``matches`` operator::
178178

179-
$language->evaluate('not "foo" matches "/bar/"'); // returns true
179+
$language->evaluate('not ("foo" matches "/bar/")'); // returns true
180+
181+
You must use parenthesis because the unary operator ``not`` has precedence
182+
over the binary operator ``matches``.
180183

181184
Examples::
182185

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp