Regular Expression newbie question about upper & lower case



I want to check for both upper & lower case answers when a user keys in
a response to a question, but I haven't been able to find an example of
the syntax. What I'm looking for is something like this:

If $ans = [Yy]*

I know this syntax isn't correct, but what I want it to do is accept Y,
y, yes, YeS, yippee, etc. Would someone mind posting an example?
Thanks....
--
Posted via http://www.ruby-forum.com/.

.



Relevant Pages

  • [OT] Re: Chinese Syntax
    ... > Why is Chinese syntax so uneasy on the eye? ... your post (a properly-threaded response to thread "C Syntax") ... flaky newsfeeds who didn't read the original message ). ...
    (comp.lang.c)
  • Re: Enumerate all attributes and classes with a given base OID?
    ... > Please reread my original post, ... Please re-read my response, ... > states that the syntax typically used by OIDs supports ONLY equality and ...
    (microsoft.public.win2000.active_directory)
  • Re: Enumerate all attributes and classes with a given base OID?
    ... > Please reread my original post, ... Please re-read my response, ... > states that the syntax typically used by OIDs supports ONLY equality and ...
    (microsoft.public.windows.server.active_directory)
  • Re: String#to_rx ?
    ... No further response. ... >> slowing regular expression matching. ... > down matching is the one that executes arbitrary Perl statments, ... >> changes to regexp syntax. ...
    (comp.lang.ruby)
  • Re: what is error in this line of code?
    ... > Thanks for the quick response! ... This kind of errors become pretty obvious when your text editor has syntax ... ++ Manda tus dudas al grupo, no a mi buzón -+ Send your questions to the group, not to my mailbox -- ...
    (comp.lang.php)