From: Rajinder Yadav Date: 2009-10-31T04:13:19+09:00 Subject: Re: How do you get the tail end of a string? On Fri, Oct 30, 2009 at 6:49 AM, Bertram Scharpf wrote: > Hi, > > Am Freitag, 30. Okt 2009, 13:35:24 +0900 schrieb Rajinder Yadav: >> Just Another Victim of the Ambient Morality wrote: >>>     I'm actually hoping this is an embarrassing question but how do you >>> get the tail end of a string?  All I've figured out is this: >> using reg-ex >> >> irb(main):102:0> "quick brown fox".scan /.$/ >> => ["x"] > > Why scan? There's just one match. > >  "quick brown fox"[ /.\z/] I like this and need to revisit a few things, thanks =) > Bertram > > > -- > Bertram Scharpf > Stuttgart, Deutschland/Germany > http://www.bertram-scharpf.de > > -- Kind Regards, Rajinder Yadav http://DevMentor.org Do Good! - Share Freely, Enrich and Empower people to Transform their lives.