Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > extracting a string

Reply
Thread Tools

extracting a string

 
 
karaokekatie karaokekatie is offline
Junior Member
Join Date: Sep 2007
Posts: 1
 
      09-12-2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting a string Mar Thomas Java 9 01-15-2004 04:54 AM
extracting integers from string R Java 2 07-25-2003 03:47 AM
Re: extracting string Ben Pfaff C Programming 0 06-26-2003 05:59 AM
Re: extracting string Martien Verbruggen C Programming 0 06-26-2003 05:58 AM
Re: extracting string Zoran Cutura C Programming 0 06-26-2003 05:46 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57