A
A
Alexander2020-03-14 09:14:19
PHP
Alexander, 2020-03-14 09:14:19

How to add unauthorized addresses from a hotspot to adresslist?

Good day.

The crux of the matter is this. It is necessary to add to the address a list of addresses that are not authorized in the Hotspot, but I can’t figure out how to get the exact address if the conditions are met. There have been attempts in this direction.

:foreach i in=[ /ip hotspot host find address where authorized =no and bypassed =no ] do={ :put $i; };


But I don't get an address. The output is empty.

If I write

:foreach i in=[ /ip hotspot host print  where authorized =no and bypassed =no ] do={:put $i;}


Then I get the output on the screen, but of course it's not just an IP, but an array of strings passed by the conditions. Now you need to pick up the IP from these lines, but I still don’t understand how to do this.

How can I get only the IP from the address column?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2019-08-08
@Diversia

/посоветуй.+?фильм/iug
https://regex101.com/r/F8ZiVq/2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question