From: Chris Hulan Date: 2008-12-18T09:57:15+09:00 Subject: Re: what's wrong with my method and regular expression? On Dec 17, 7:07 pm, equinox wrote: > The code is > > http://pastie.org/341880 > > And i want it to return > > nilwww.yahoo.co.in > /~testing/i.html > > but when I run this code, why doesn't thewww.yahoo.co.indetected? You might want to play with your regex on Rubular (http:// rubular.com/) A little experimentation shows that you probably want to include 'http://' in your input string cheers