On 11/6/06, CParticle <cparticle / gmail.com> wrote: > Thanks I was not aware that scan worked that way I'll have to adjust to > take account of scan beharvior. > > I did know that I could assign first and last in one line I was just > was being lazy about looking up the syntax(I'm still new to ruby). > > I'll keep that in mind regarding the naming convention. > > Regarding my issue the fourth line is still puzzling to me I would > think that even with my code the way it is firstName and lastName at > least should come out as stings and so the last line the searchUser > assignment shouldn't need to have lastName.to_s can anyone shed some > light as to why this would be? > > displayName = current_message.Body.scan(/^Employee Name -+> (.*)\./) > firstName = displayName.to_s.split(", ")[1] > lastName = displayName.to_s.split(", ")[0] > searchUser = lastName.to_s.downcase[0,3] + firstName.to_s.downcase[0,1] > + "*" It should work without it, and it works for me without the to_s. Use p to see what class is firstName and lastName. Maybe posting your test message body would help.