Re: Regular Expression newbie question about upper & lower c
- From: Peter Vanderhaden <bostonantifan@xxxxxxxxx>
- Date: Mon, 1 Oct 2007 02:01:11 +0900
Thank you much. Does the i at the end of the expression indicate
case-insensitivity?
SpringFlowers AutumnMoon wrote:
Peter Vanderhaden wrote:
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....
something like
a =~ /^y/i
will do
--
Posted via http://www.ruby-forum.com/.
.
- Follow-Ups:
- Re: Regular Expression newbie question about upper & lower c
- From: SpringFlowers AutumnMoon
- Re: Regular Expression newbie question about upper & lower c
- From: Sebastian Hungerecker
- Re: Regular Expression newbie question about upper & lower c
- References:
- Regular Expression newbie question about upper & lower case
- From: Peter Vanderhaden
- Re: Regular Expression newbie question about upper & lower case
- From: SpringFlowers AutumnMoon
- Regular Expression newbie question about upper & lower case
- Prev by Date: Re: Regular Expression newbie question about upper & lower case
- Next by Date: Re: Can you please help to make decision?
- Previous by thread: Re: Regular Expression newbie question about upper & lower case
- Next by thread: Re: Regular Expression newbie question about upper & lower c
- Index(es):
Relevant Pages
|