New replace(s, pat => f) in functiion How to use?

No idea ho to cheng old function to new , some help ?
‘’’ for i =1:k

only=map(e->replace(string(e), i, “”), only)

end
┌ Warning: replace(s::AbstractString, pat, f) is deprecated, use replace(s, pat => f) instead.
│ caller = #11 at REPL[45]:6 [inlined]
└ @ Core .\REPL[45]:
‘’’
Paul

Try this:

only = map(e->replace(string(e), string(i) => ""), only)
1 Like