From: WJ Date: 2011-04-23T04:40:44+09:00 Subject: Re: String problem Cyril Jose wrote: > Hello all, > > I am trying to read characters in a string but I want to ignore the > first character and the newline at the end of the string, then store the > characters in between into a new variable: > > str = ">Hello World\n" > new_var = " Hello World" > > Any ideas to point me in the right direction? ">Hello World\n"[ /.(.*)/, 1] ==>"Hello World" ">Hello World\n".rstrip[ 1 .. -1] ==>"Hello World"