I found the selected address and i can print it too, but i don't need netmask from the end.
Example:
if i have a fix length ip format. (the first octet is fix, the 2nd fix, than the 3rd is only 10-99 and the 4th too) Than i can use :pick. But the length of the address is changing every time i change router >.<ip address: 10.100.11.22/24
so this isn't a good solution:
Code: Select all
:local variable [/ip address find address~"^10\\.100\\.([1-9]{1,3}|[0-9]{2,3})\\.([02-9]{1,3}|[0-9]{2,})"];
:put $variable;
:local ipvar [/ip address get value-name=address number=$variable ];
:put $ipvar;
:local pickvar [:pick $ipvar 0 12];
So i want to cut it where the slash is.
Have mikrotik something like grep?