From: mike@... (Mike Stok) Date: 2002-03-23T05:28:22+09:00 Subject: Re: Sub-String In article , Sean O'Dell wrote: > Yeah, that worked great, thank you. Where did you learn to do that? I > bought three Ruby books and even now that I know how to do that, I can't > find reference to that anywhere. I must be missing something. First of all I fire up irb and just try a couple of likely names and argument lists, many times that "just works" as I get more used to Ruby. irb is a quick way to learn by doing... If that fails, then I look in my copy of Programming Ruby at the Built-In Classes and Methods section if I can, failing that (e.g. when at work) I go on line - in this case to http://www.rubycentral.com/book/builtins.html - and look for a likely method name. Once I have read the description I try it in irb to see if I have understood what I read. That's what I did this time, if that hadn't worked then I would have searched on google for ruby substr and found something like www.zenspider.com/Languages/Ruby/Cookbook/Strings/AccessingSubstrings.html Hope this helps, Mike -- mike@stok.co.uk | The "`Stok' disclaimers" apply. http://www.stok.co.uk/~mike/ | GPG PGP Key 1024D/059913DA mike@starnix.com | Fingerprint 0570 71CD 6790 7C28 3D60 http://www.starnix.com/ | 75D2 9EC4 C1C0 0599 13DA