The code is
And i want it to return
nil
www.yahoo.co.in
/~testing/i.html
but when I run this code, why doesn’t the www.yahoo.co.in detected?
The code is
And i want it to return
nil
www.yahoo.co.in
/~testing/i.html
but when I run this code, why doesn’t the www.yahoo.co.in detected?
On Dec 17, 7:07 pm, equinox [email protected] wrote:
The code is
And i want it to return
nilwww.yahoo.co.in
/~testing/i.htmlbut 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
On Dec 17, 6:04 pm, Chris H. [email protected] wrote:
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 stringcheers
the code should work for both, if there’s no http:// then it should
print out:
nil
www.yahoo.co.in
/~testing/i.html
if there is then it should print:
http
www.yahoo.co.in
/~testing/i.html
On Dec 17, 6:08 pm, equinox [email protected] wrote:
And i want it to return
in your input stringhttpwww.yahoo.co.in
/~testing/i.html
anyway thanks for the rubular link I was able to fix the code using
it…
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs