V7.21beta [testing] is released!

:put [[:parse ":return 10.0.0.10/24"]]
# return 10.0.0.10/24 ip-prefix type

Just tested:

:put [:toip [[:parse ":return [/ip address get [find where interface=bridge1] address] "]] ]

# or better
{
:local fullIP [/ip address get [find where interface=bridge1] address]
:local onlyIP [:toip [[:parse ":return $fullIP"]] ]
:put "From $fullIP <$[:typeof fullIP]> to $onlyIP <$[:typeof onlyIP]>"
}

# result example:
[rex@tended] > {
{... :local fullIP [/ip address get [find where interface=bridge1] address]
{... :local onlyIP [:toip [[:parse ":return $fullIP"]] ]
{... :put "From $fullIP <$[:typeof $fullIP]> to $onlyIP <$[:typeof $onlyIP]>"
{... }
From 6.7.8.9/23 <str> to 6.7.8.9 <ip>
[rex@tended] >
1 Like