From: Robert Klemme Date: 2008-01-14T22:47:15+09:00 Subject: Re: regular expression 2008/1/14, Johnathan Smith : > hey > > only a very basic start im afraid > > ^([a-zA-Z]{10})$ > > i.e > ten letter word (upper or lower case) > basically i need to get it now so it only deals with words with the > suffix's a mentioned > > any pointers? You can do either if /^\w{7}(?:\wed|ing)$/i =~ str # process match end or if str.length == 10 && /(?:ed|ing)$/i =~ str # process match end There are of course more alternatives... :-) Kind regards robert -- use.inject do |as, often| as.you_can - without end