extracting a string

Joined
Sep 11, 2007
Messages
1
Reaction score
0
I'm fairly new to java and I was wondering if anyone could help me out with this. I need to write a program that asks the user to input one line of HTML code containing one anchor tag. Then, using and combining the String methods, output the URL and the displayed text of the link.

For example, if the user inputs:

Follow this <a href="http://www.google.com">web link</a> to get to Google.

Then the program should output:

URL: http://www.google.com
displayed text: web link

simple I know but I'm having a hard time deciding on which methods to use.
anyone have any tips on how I should go about doing this? Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,264
Messages
2,571,065
Members
48,770
Latest member
ElysaD

Latest Threads

Top