Recursive str replace.