From: jake kaiden Date: 2011-10-31T11:23:17+09:00 Subject: Re: "A" and "an" articles in front of words hi Faith, one way to approach this could be... check out the #each method that works with Arrays - http://www.ruby-doc.org/core-1.9.2/Array.html#method-i-each this will cycle through each entry in an array, and in your case give you back a string... ruby Strings have an easy way of finding the first letter, the `[]` method... you can do something like this: string = "hi there" puts string[0] => h http://www.ruby-doc.org/core-1.9.2/String.html#method-i-5B-5D you could use a regular expression (http://www.ruby-doc.org/core-1.9.2/Regexp.html) to determine whether to put an "a" or an "an" before each word based on its first letter... maybe you could write a method called `indefinite_article(string)` which would take a string as an argument, check its first letter, and then decide what article to use. you could then call this method from within the Array#each block... if you get a bit of code together, post it here and folks will be happy to help out more... - j -- Posted via http://www.ruby-forum.com/.