Results 1 to 5 of 5

Thread: parsing problem

  1. #1
    Join Date
    Apr 2008
    Posts
    13
    Rep Power
    0

    Default parsing problem

    Hi All,

    I want to parse a .java or .txt file and store the contents in some data structure, say an array or linked list. using java.util.regex is the correct option or is there any other better option to do the same? the contents generated out of this parsing would be huge.

    thanks in advance!:)

    Regards,
    Pooja

  2. #2
    Join Date
    Apr 2008
    Location
    Fort Wayne, Indiana
    Posts
    62
    Rep Power
    0

    Default

    I don't see why you wouldn't use regular expressions. They are great for parsing anything and i don't see this case being any different.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  4. #4
    Join Date
    Apr 2008
    Location
    Fort Wayne, Indiana
    Posts
    62
    Rep Power
    0

    Default

    As far as data structures go, i would think that the linked list would be your best bet if you are just grabbing pieces and putting them into the structure from a file on indefinite length, but if you are parsing different parts out of it then you might need a custom structure for all of your parts. Would need more specifics on the problem.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. xml parsing
    By gaurav65176 in forum XML
    Replies: 5
    Last Post: 11-12-2008, 11:07 AM
  2. Parsing URL in Java
    By Java Tip in forum java.net
    Replies: 0
    Last Post: 04-07-2008, 08:14 PM
  3. Parsing URL
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-26-2007, 10:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •