address-list manipulation from terminal

Hi,

I have a large address list which I’d like to search for the first few octets then manipulate (disable, enable).

Example, I’d like to search a specific address list for addresses that start with 192.168.*, find the exact one I want to manipulate by narrowing my search, then enable/disable the entry.

How does one do this at the terminal?

TIA
-Steve

You can use regular expression matching, something like this:

/ip firewall address-list
:foreach i in=[find where address~"^192\\.168\\."] do={
  # example, modify as needed
  :put [get $i address]
}