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"