Community discussions

MikroTik App
 
User avatar
zBear
just joined
Topic Author
Posts: 23
Joined: Sat Mar 07, 2015 6:17 pm

Regexp in DNS Static

Wed Mar 13, 2024 9:07 pm

Hi,

In my IP - DNS - Static I have 4 records

dns.nextdns.io 111.111.111.111
dns1.nextdns.io 111.111.111.111
dns.nextdns.io 222.222.222.222
dns2.nextdns.io 222.222.222.222

as you can see, first and a second pair have matching IP addresses
I'm thinking about combining every pair into one record and I'm looking for your advice with Regex on Mikrotik

should it be like this? *
^dns[0-2]?\.nextdns\.io$ 111.111.111.111
^dns[0-2]?\.nextdns\.io$ 222.222.222.222

or may be like this?
^dns\.nextdns\.io$|^dns1\.nextdns\.io$ 111.111.111.111
^dns\.nextdns\.io$|^dns2\.nextdns\.io$ 222.222.222.222

* updated for a better match
Last edited by zBear on Fri Mar 15, 2024 9:40 pm, edited 3 times in total.
 
User avatar
zBear
just joined
Topic Author
Posts: 23
Joined: Sat Mar 07, 2015 6:17 pm

Re: Regexp in DNS Static  [SOLVED]

Fri Mar 15, 2024 4:24 pm

Will be answering for myself :-)

Both options are valid and working fine

Who is online

Users browsing this forum: Bing [Bot], Callahan, dioeyandika, JanO and 17 guests