From: Joel VanderWerf Date: 2008-05-08T06:40:09+09:00 Subject: Re: Check if char in string? globalrev wrote: > On 7 Maj, 22:04, RedWiz wrote: >>> but none of that is what i want to do. >>> i want to chekc if a char is in a string. >>> not check if a char equals another char. >> ok, you don't know regexp >> >> do it > > > but > if str =~ /aeiouy/ > do foo > end > > doesnt work. or i mena it works but iw ant to chekc if it is a vowel > not if contains the expr aeiouy. > how do i delimit the expressins? str =~ /[aeiouy]/ This checks if str contains one of those chars. Regular expressions are worth learning more about. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407