extracting a string

Discussion in 'Java' started by karaokekatie, Sep 12, 2007.

  1. karaokekatie

    karaokekatie

    Joined:
    Sep 12, 2007
    Messages:
    1
    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
     
    karaokekatie, Sep 12, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. R
    Replies:
    2
    Views:
    539
    Jon A. Cruz
    Jul 25, 2003
  2. Mar Thomas

    Extracting a string

    Mar Thomas, Sep 26, 2003, in forum: Java
    Replies:
    9
    Views:
    395
    Tony Morris
    Jan 15, 2004
  3. Zoran Cutura

    Re: extracting string

    Zoran Cutura, Jun 26, 2003, in forum: C Programming
    Replies:
    0
    Views:
    736
    Zoran Cutura
    Jun 26, 2003
  4. Ben Pfaff

    Re: extracting string

    Ben Pfaff, Jun 26, 2003, in forum: C Programming
    Replies:
    0
    Views:
    699
    Ben Pfaff
    Jun 26, 2003
  5. Martien Verbruggen

    Re: extracting string

    Martien Verbruggen, Jun 26, 2003, in forum: C Programming
    Replies:
    0
    Views:
    739
    Martien Verbruggen
    Jun 26, 2003
Loading...

Share This Page