mirror of
https://github.com/gbudny93/RouterOS_Useful_Scripts.git
synced 2025-07-21 11:24:24 +02:00
Initial Commit
This commit is contained in:
parent
fee1e16817
commit
1744ffa992
3 changed files with 61 additions and 0 deletions
23
RouterOS_Substring_Variable.rsc
Normal file
23
RouterOS_Substring_Variable.rsc
Normal file
|
@ -0,0 +1,23 @@
|
|||
# RouterOS Function
|
||||
# Copyright (c) Grzegorz Budny
|
||||
# Substring variable
|
||||
|
||||
:global Subtring do={
|
||||
|
||||
:global substring;
|
||||
|
||||
:if ($findMode=true) do={
|
||||
|
||||
:set $substring [:pick $string [:find $string $signA] [:find $string $signB]];
|
||||
:return $substring;
|
||||
|
||||
}\
|
||||
else={
|
||||
|
||||
:set $substring [:pick $string $signA $signB];
|
||||
:return $substring;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$Substring findMode=true string="string" signA="A" signB "b";
|
Loading…
Add table
Add a link
Reference in a new issue