I'm trying to find http links in a web page.I am writing a code for it.I'm searching line by line but if the web page code, has more than one http link, my code finds only one link.What should I do? This is my code;
You're using String's indexOf(str) method, which finds the first occurrence of the str argument. You will probably want to use String's indexOf(str, int) method, which begins searching at the indicated index.
So, for example, if you find your first occurrence at index 108, then you will want to start searching for your next occurrence at index 109.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org