Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Parsing urls

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Parsing urls

    can nyone hlp us in getting the things related to StringTokenizer class..
    like is it possible to take / ,// both as delimiters in same pgm code..
    like..
    StringTokenizer st = new StringTokenizer(in, ":/ //")
    means. to have forwrad slash and double slash to be treated separately..
    plz

    otherwise hlp in getting d code to parse d urls like
    http://yahoo.com/news.html.
    plz

    atleast give idea


  2. #2
    Member DanBrown's Avatar
    Join Date
    Jan 2011
    Posts
    134
    My Mood
    Confused
    Thanks
    1
    Thanked 12 Times in 12 Posts

    Default Re: Parsing urls

    st = new StringTokenizer(strLine, ":// // .");

    this will split your whole url into different string tokens
    Thanks and Regards
    Dan Brown

    Common Java Mistakes

  3. #3
    Super Moderator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,216
    Thanks
    175
    Thanked 814 Times in 757 Posts
    Blog Entries
    5

    Default Re: Parsing urls

    Without knowing what you are truly doing, this may or may not be overkill but I will post the link for edification: Learning Regular Expressions

Similar Threads

  1. URLs in browsers
    By subhvi in forum Java Networking
    Replies: 3
    Last Post: October 8th, 2010, 03:06 AM
  2. Parsing CDATA
    By Sai in forum What's Wrong With My Code?
    Replies: 3
    Last Post: April 9th, 2010, 12:33 AM
  3. How to read URLs from a web page
    By abitha in forum Java Theory & Questions
    Replies: 1
    Last Post: September 17th, 2009, 12:36 PM
  4. Printing xml to the console from .wmdb without printing junks
    By John in forum File I/O & Other I/O Streams
    Replies: 9
    Last Post: April 24th, 2009, 03:44 AM
  5. [SOLVED] Parsing ID3 tags from mp3
    By John in forum Java Theory & Questions
    Replies: 14
    Last Post: April 16th, 2009, 01:36 PM