Community discussions

MikroTik App
 
jeroenp
Member Candidate
Member Candidate
Topic Author
Posts: 159
Joined: Mon Mar 17, 2014 11:30 am
Location: Amsterdam
Contact:

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

Thu Oct 13, 2016 7:30 pm

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

Who is online

Users browsing this forum: No registered users and 22 guests