bug: Mikrotik script regex fails to support POSIX character classes like [:digit:]
Posted: Thu Oct 13, 2016 7:30 pm
http://wiki.mikrotik.com/wiki/Manual:Sc ... _Operators documents “~” as
That fails at first try: `[:digit:]` isn't supported.
@Mikrotik: please document what portions of the POSIX extended regular expressions are support and what portions are not supported.
--jeroen
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.binary operator that matches value against POSIX extended regular expression
That fails at first try: `[:digit:]` isn't supported.
Code: Select all
[jeroenp@MikroTikCCR1009] > :put ("1"~"[:digit:]")
false
[jeroenp@MikroTikCCR1009] > :put ("1"~"[0-9]")
true
--jeroen