Well you would not be the first to want such a function… see 2018 thread: http://forum.mikrotik.com/t/built-in-function-library/117288/1
It’s not easy, and limited. But you can :find and :pick your way through it… see http://forum.mikrotik.com/t/change-word-in-comment/163850/1