How to replace list of char in string array?

I have a list of chars


julia> usuwam

96×1 Array{Any,2}:
 "\""
 """
 "A"
 "/"
...

and i need to repalce all from string Array:
julia> string.(dane[:,5])
1074762-element Array{String,1}:
 "TEST"
 "VENDISERVISSp.zo.o."
 "CONRADCOMPANYKonradKaczyński"
 "AquaHotel"
....

this loop not work

for i in usuwam
replace.(string.(dane[:,5]),i=>"") 
end

What wrong ?
Paul

Please quote your code.

2 Likes

This would (probably) work:

data = ["Pod","papugami","jest","szeroko","niklowany","bar"]
println(data)

usuwam = ["u","sz"]

for i in usuwam
  global data = replace.(data,i=>"")
end
println(data)

Alternatively, do replace!().

1 Like