From: Stefan Matthias Aust Date: 2001-05-27T22:12:45+09:00 Subject: [ruby-talk:15799] Re: Check a few characters of a string: How? "Franz GEIGER" wrote: >Want to check the first or last character of a string or say any character >of a string. Do I really have to write s[0..0] to *not* get a number but to >get a *character*? Or even worse: Must I expand String and Array somehow for >that? I think, you could write either use the "?" syntax to refer to characters as in s[0] == ?A s[-1] == ?Z or use a regular expression s =~ /^A/ s =~ /Z$/ bye -- Stefan Matthias Aust \/ Truth Until Paradox