Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 1.23 KB

none.markdown

File metadata and controls

54 lines (44 loc) · 1.23 KB
layout title categories published alias tags
default
none
Reference
Functions
none
true
reference-functions-none.html
reference
data functions
functions
none

Prototype: none(regex, list)

Return type: class

Description: Returns whether no element in list matches the regular expression regex.

Arguments:

  • regex : [Unanchored][unanchored] regular expression to find, in the range .*
  • list : The name of the list variable to check, in the range [a-zA-Z0-9_$(){}\[\].:]+

Example:

bundle agent example
{
  classes:
      "none1" expression => none("jebadiah", "test");
      "none2" expression => none("2", "test");

  vars:
      "test" slist => {
                        1,2,3,
                        "one", "two", "three",
                        "long string",
                        "four", "fix", "six",
                        "one", "two", "three",
                      };

  reports:
      "The test list is $(test)";
    none1::
      "none() test 1 passed";
    !none1::
      "none() test 1 failed";
    none2::
      "none() test 2 failed";
    !none2::
      "none() test 2 passed";
}

See also: [filter()][filter], [every()][every], and [some()][some].