From: Lucky Nl Date: 2012-04-11T02:47:27+09:00 Subject: Re: need to match words from setence Hmm include method will match substring too.This is not i want .I want to match exactword with wordboundary. and additional scenario is only search word can have leading, tralining specialchar that too only one occurence should allow Hope this clear now Lucky Nl wrote in post #1055770: > Hi friends, > I have small requirement > > Example > sentence = "this is important information" > > > Now i want search word "important" from sentence. > I can do this match > Suppose if i have sentence like > > case1: > > sentence = "this is @important, information" > > in this case i should get to match with word "important" > > Case2: > sentence = "this is &@important,^% information" > > in this case i should get to match with word "important" > > this should not match > > > means word has only one traling/leading specialchar would be fine > > > Can anybodyhelp -- Posted via http://www.ruby-forum.com/.