ECMP separator

Hi
If I read an ECMP gateway in mikrotik script the separator is a semi-colon:

:local defgateway
:set defgateway [/ip route get [/ip route find comment=default] gateway]
:log info $defgateway

the output is:
script info 172.17.2.1;172.17.3.1;172.17.4.1

If I want to set a new gateway
:set router 172.17.5.1
:set newgateway ($defgatweway . “;” . $router)
/ip route set [/ip route find comment=default] gateway=$newgateway

It’s not working 'cause it needs the gateway separator to be a comma

If I export the routes to a script file the separator is a comma
what can be done