dfilter: Deprecate "~=" (any_ne)

The representation "~= has been superseded by "!==" with the same
meaning, making it superfluous and somewhat confusing. Deprecate
"~=" and recommend "!==" instead.
pespin/osmux-wip
João Valverde 2022-03-05 12:30:34 +00:00 committed by A Wireshark GitLab Utility
parent e035fa3508
commit 8983dda8f2
3 changed files with 6 additions and 4 deletions

View File

@ -77,8 +77,6 @@ operators, their aliases and meaning:
all_eq, === All fields must be equal
any_ne, !== Any fields must be not equal
The operator !== (any_ne) can also be written as ~=.
=== Search and match operators
Additional operators exist expressed only in English, not C-like syntax:

View File

@ -53,7 +53,7 @@ They previously shipped with Npcap 1.55.
PCRE2 is compatible with PCRE so the user-visible changes should be minimal.
Some exotic patterns may now be invalid and require rewriting.
** Adds a new strict equality operator "===" or "all_eq". The expression "a === b" is true if and only if all a's are equal to b.
The negation of "===" can now be written as "!==" (any_ne), in addition to "~=" (introduced in Wireshark 3.6.0).
The negation of "===" can now be written as "!==" (any_ne).
** Adds the aliases "any_eq" for "==" and "all_ne" for "!=".
** Date and time can be given in UTC using ISO 8601 (with 'Z' timezone) or by appending the suffix "UTC" to the legacy formats.
Otherwise local time is used.
@ -62,6 +62,7 @@ They previously shipped with Npcap 1.55.
Every value with a leading colon or in between angle brackets is a literal value. See the User Guide for details.
** Floats must be written with a leading and ending digit. For example the values ".7" and "7." are now invalid as floats.
It must be written "7.0" and "0.7" respectively.
** The operator "~=" is deprecated and will be removed in a future version. Use "!==" with the same meaning instead.
* text2pcap and "Import from Hex Dump":
** text2pcap supports writing the output file in all the capture file formats

View File

@ -124,7 +124,10 @@ WORD_CHAR [][:alnum:]_:/+-]
"===" return simple(TOKEN_TEST_ALL_EQ);
"all_eq" return simple(TOKEN_TEST_ALL_EQ);
"!==" return simple(TOKEN_TEST_ANY_NE);
"~=" return simple(TOKEN_TEST_ANY_NE);
"~=" {
add_deprecated_token(yyextra->dfw, "The operator \"~=\" is deprecated, use \"!==\" instead.");
return simple(TOKEN_TEST_ANY_NE);
}
"any_ne" return simple(TOKEN_TEST_ANY_NE);
">" return simple(TOKEN_TEST_GT);
"gt" return simple(TOKEN_TEST_GT);