how can i delete such a specific line from comment and replace it
without any change for other lines in the comment
plz give suck a script do add comment and delete it
rich,man,john
/ip hotspot user
:foreach i in=[find] do={
# get comment, convert to array
:local in [:toarray [get $i comment]]
# change selected array item
:set ($in->1) "foo"
# output string container
:local out
# counter to keep track of where we are at in array
:local count 1
# loop through array, reconstruct comma separated string
:foreach j in=$in do={
:set out ($out . $j)
:if ($count < [:len $in]) do={
:set out ($out . ",")
}
:set count ($count + 1)
}
# set comment with new string
set $i comment="$out"
}
:set ($in->1) "foo"