I need to delete all ip firewall flter rules, where comment started with string "MYRULE_" .
I know how to do that in command line:
Code: Select all
ip firewall filter remove [find [:pick $comment 0 6]="MYRULE"]
ip firewall filter remove [find [:pick $comment 0 6]="MYRULE"]
$util->setMenu('/ip firewall filter')->remove(function ($item) {
return 0 === strpos($item('comment'), 'MYRULE');
});