How to find a comment that doesn’t contain a specific text
/ip hotspot user [ find comment~"a" ]
But I want to find a comment that doesn’t contain the text “a” for example.
How to find a comment that doesn’t contain a specific text
/ip hotspot user [ find comment~"a" ]
But I want to find a comment that doesn’t contain the text “a” for example.
/ip hotspot user find comment!~"a"
~ Does contain
!~ Does not contain
NB do not use in the way you did.
You can also mix and match:
/ip hotspot user find comment!~"a" comment~"b"
to get result to a variable:
:local test [/ip hotspot user find comment!~"a" comment~"b"]
{
:loc d [/system clock get date];
:local mo [:pick $d 0 3];
/ip h u remove [ find comment!~ "$mo" ]
}
dont work
but if
{
:loc d [/system clock get date];
:local mo [:pick $d 0 3];
/ip h u remove [ find comment~ "$mo" ]
}
it work
/ip hotspot user print where !(comment~"a")