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? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
jeroen.knoops-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jul-17 20:26 UTC
Re: replace string
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 Saeed <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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? > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---