Community discussions

MikroTik App

Search found 3 matches

by vadimsachkov
Tue Oct 22, 2024 9:48 am
Forum: Scripting
Topic: A strange bug in firmware 7.16.1: netwatch and variable $ip
Replies: 1
Views: 1263

A strange bug in firmware 7.16.1: netwatch and variable $ip

I noticed a strange bug in version 7.16.1 of the script. I will demonstrate it in the following example:: :local ip 8.8.8.8; :local HostIP 8.8.8.8; /tool netwatch print stats; :if ([:typeof $ip]="ip" && [:len [/tool netwatch find host=$ip comment="ping"]]=0 ) do={ if ([:t...
by vadimsachkov
Tue Feb 27, 2024 9:30 am
Forum: Scripting
Topic: Using regex in Mikrotik and creating search functions with return values
Replies: 5
Views: 9099

Re: Using regex in Mikrotik and creating search functions with return values

do you have a simplified version? wherein we can only get the exact word ? like a reference number on text sms ? For your case, you can still use the findPosix function, but you only need the first element of the returned array, which contains the found substring Usage example: /system script run S...
by vadimsachkov
Tue Mar 12, 2019 3:28 pm
Forum: Scripting
Topic: Using regex in Mikrotik and creating search functions with return values
Replies: 5
Views: 9099

Using regex in Mikrotik and creating search functions with return values

Mikrotik can search by regular expressions, returning a boolean value. This link https://wiki.mikrotik.com/wiki/Manual:Regular_Expressions provides information about the search capabilities for regular expressions. As always, this information is extremely brief. It is often necessary to get exactly ...