Replace string

hello
how to part of string with other

i.e.

string x = “3(1i)4”

x.replace("(1i"),"")

x = “34”

how to do that in RoR?

Ola!

try:
x = “3(1 i)4”
x[“(1 i)”] = “”

result:
x → “34”
See Programming Ruby - page 609: []=

Best regards,
Jeroen

On Jul 17, 9:39 pm, Mohamed S. [email protected]