mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-06-20 17:55:40 +02:00
mod/inspectvar: replace only when matching
This commit is contained in:
parent
36f155ce62
commit
bd3cc3bbd4
1 changed files with 6 additions and 1 deletions
|
@ -53,7 +53,12 @@
|
|||
:if ($TypeOf = "str") do={
|
||||
:set $Return ($Return . "\n" . \
|
||||
[ $IndentReturn "len" $Len $Level ]);
|
||||
:set Input [ $CharacterReplace [ $CharacterReplace $Input ("\r") "" ] ("\n") " " ];
|
||||
:if ([ :typeof [ :find $Input ("\r") ] ] = "num") do={
|
||||
:set Input [ $CharacterReplace $Input ("\r") "" ];
|
||||
}
|
||||
:if ([ :typeof [ :find $Input ("\n") ] ] = "num") do={
|
||||
:set Input [ $CharacterReplace $Input ("\n") " " ];
|
||||
}
|
||||
}
|
||||
:if ($TypeOf != "nothing") do={
|
||||
:set $Return ($Return . "\n" . \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue