Exact phrase in include?

I have a string that I check with include? There are two words in the
string that contains the same word of "design". One is "design" the
other "designer". How can I check for an exact phrase of "design"?

···

--
Posted via http://www.ruby-forum.com/.

Pål Bergström wrote:

I have a string that I check with include? There are two words in the
string that contains the same word of "design". One is "design" the
other "designer". How can I check for an exact phrase of "design"?

string =~ /\bdesign\b/

Sebastian Hungerecker wrote:

Pål Bergström wrote:

string =~ /\bdesign\b/

Perfect. Thanks.

···

--
Posted via http://www.ruby-forum.com/\.