From: Abhijit Gadgil Date: 2007-05-04T02:33:44+09:00 Subject: Re: Regular expression - first two alphabets of a string def matchaa (str) if str.match(/^aa/) return true else return false endend On 5/3/07, Ravi Singh wrote:> Hi All,>> I learning regular expressions in Ruby and I want to do the following> thing with a strings>> "A sting should not start with two a i.e aa">> example>> "aa xyz" - wrong> "axyz" - is fine> "a xyz" is fine>> please help.>> Regards,>> --> Posted via http://www.ruby-forum.com/.>> -- अभिजीत [ written in http://www.paahijen.com/scratchpad ] [ http://www.paahijen.com ]