http://wiki.mikrotik.com/wiki/Manual:Scripting#Other_Operators documents “~” as
binary operator that matches value against POSIX extended regular expression
Part of http://www.regular-expressions.info/posixbrackets.html Basic Regular Expressions is support for POSIX Bracked Expressions http://www.regular-expressions.info/posixbrackets.html like Character Classes.
That fails at first try: [:digit:]
isn’t supported.
[jeroenp@MikroTikCCR1009] > :put ("1"~"[:digit:]")
false
[jeroenp@MikroTikCCR1009] > :put ("1"~"[0-9]")
true
@Mikrotik: please document what portions of the POSIX extended regular expressions are support and what portions are not supported.
–jeroen