I need to find ip addresses where :
The ip address is need to be:
10.100.0.* or 10.100.*.1 and if this statement is true than i need to run something.
my try:
if ([:len [/ip address find where address=10.100.0.* disabled=no]]>0
or
[:len [/ip address find where address=10.100.*.1 disabled=no]]>0) do={};
probably it doesn’t work for me.
So i tried with regex but i don’t know how to use it…
if ([:len [/ip address find where address=10.100.0.“[1]{1,3}” disabled=no]]>0
or
[:len [/ip address find where address=10.100.*.1 disabled=no]]>0) do={};
but unfortunately that’s give me back 0 too so idk what can i do.
So give me a helping hand please
i want to exchange ospf instence router id from 0.0.0.0 to a 10.100. something address.
But:
i dont want to exchange the address to a severel ways, like if the address is something like this:
addresses with network 10.100.0.0/24
or
address like 10.100.*.1
so i need to unselect these addresses, in different routers so i cant select only one ip and check it, because i don’t know the complete ip
And i think if i try to put an address into a variable and its doesnt exists than the script got an error and break the script
probably i can’t circumscribes clearly what i want exactly so i end this part of my question and because i don’t want to make another one i write my new question to here.
if this symbol ~ mean the “something like” than what is the it’s not like as
i thinked its will be the !~ but that’s give me back 0 collums.
And i know its again a rly rly bad question, but thats me.. i cant make any good question
Probably i solved it. Probably i wanted the else statement because if the if statement is true than it’s probably not good for me. But than i used something like this:
if ([:len \\\r\
\n[/ip address find where address~\"^10\\\\.100\\\\.([1-9]{1,3}|[0-9]{2,3})\\\\.\
([02-9]{1,3}|[0-9]{2,})\" disabled=no]]>0) \\\r\
\ndo={