Static DNS regex is broken (I think ;))

Hi!

I had dnsmasq with custom regex mod and now I moved DNS to mikrotik. I discovered that static entries are working… well, weird. While static entries are reliable, regex ones are not. In fact I wasn’t able to run ANY regex entry.
I tried following entries:

^example\.(net|com)
(www\.)?aaa\.com

Neither of these got “R” flag. I’ve also tried following suggested by @janisk http://forum.mikrotik.com/t/static-dns-and-regexp/83240/2 - it got “R” flag but it doesn’t work (checked using dig @router).

There’s a glitch which my friend discovered - if you double click entry inside winbox without regex flag, click copy and than “apply” (not OK!) it will display error and enable regex flag. But it’s only a flag - it doesn’t work as regex.
Plus when I deleted that entry it’s still displayed in cache (flush didn’t helped).

Is something wrong with me or DNS isn’t working properly? :slight_smile:

According to this wiki page the POSIX basic regular expressions are used here.

In basic regular expressions ‘|’, ‘+’, and ‘?’ are ordinary characters. You can use bounds instead of ‘+’ and ‘?’, however there’s no equivalent for ‘|’ at all. The ‘{’, ‘}’, ‘(’ and ‘)’ are also just and ordinary characters- you should use ‘{’, ‘}’ for bounds and ‘(’ and ‘)’ for groups (nested subexpressions) instead.

For more information on POSIX regular expressions please see regex(7) (search for “basic” on the page).