: replace-string2 ( string match replace -- string' ) '[ [ dup empty? ] [ _ ?head [ _ % ] [ [ first , ] [ rest ] bi ] if ] until ] "" make nip ;