Page 1 of 1

bug: Mikrotik script regex fails to support POSIX character classes like [:digit:]

Posted: Thu Oct 13, 2016 7:30 pm
by jeroenp
http://wiki.mikrotik.com/wiki/Manual:Sc ... _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