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.

I want to improve my code.

Hello, I wrote a program to extract table data from HTML document.
However I want to shrink this code more because it has to use large array variables.
Could you give me any advice for improving this code more?

Re: I want to improve my code.

Like Newbie said, if it ain't broke don't try and fix it. That being said, your code makes very little sense given the obfuscated variable names and lack of comments that Norm pointed out. To add to their advice, I fail to see why you using regular expressions without harnessing the power of them...you could have a single regex that pulls the text inside a table element, then other regex that pulls the nested tags (tr, td...). Using a design such as this, your method could probably be shortened 10 fold, and a lot more understandable, and if written properly can be used to pull out a lot more than just a table.