From: Robert Klemme Date: 2011-01-19T21:16:56+09:00 Subject: Re: Comparing a string word by word On Mon, Jan 17, 2011 at 9:14 AM, Brajmohan S. wrote: > I am facing a problem where we have to compare two strings. I applied > the regex to match it and it works fine for the string which dont have > space in between. However in case, the matching string containg space, > then its failing. > > Please let me know how to tackle this. You could either extract words and compare corresponding arrays or you build your regexp to account for different whitespace sequences. What exactly are you attempting? Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/