Advertisement

05.13.2008 at 11:17AM PDT, ID: 23398847
[x]
Attachment Details

Arrays:  Searching for matching strings

Asked by FunkiNATEr in Java Programming Language

Tags: Java

I'm pretty new to Java so this question should be pretty easy for most of you guys to answer.  For discussion purposes, I have a text file with the following lines that I've read into a 2d array (we'll call said array tableData[][]):

**Begin file
Some string a<tab delimiter> Filename <tab delimiter> Page No\n
Some string b<tab delimiter> Filename <tab delimiter> Page No\n
Some string bbb<tab delimiter> Filename <tab delimiter> Page No\n
Some string bbc<tab delimiter> Filename <tab delimiter> Page No\n
**End file

I simply want to be able to search all elements of tableData[0] (and only tableData[0], which is the first column of my table) for any strings that match "b."  Then, I would like to populate a new temporary array with the results returned.

I hope this makes sense.  Thanks for your help.Start Free Trial
 
Loading Advertisement...
 
[+][-]05.13.2008 at 11:20AM PDT, ID: 21557766

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 11:22AM PDT, ID: 21557789

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 11:25AM PDT, ID: 21557819

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 11:28AM PDT, ID: 21557848

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 11:29AM PDT, ID: 21557858

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 11:43AM PDT, ID: 21557994

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 11:43AM PDT, ID: 21558004

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 12:00PM PDT, ID: 21558172

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Tags: Java
Sign Up Now!
Solution Provided By: CEHJ
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.13.2008 at 12:12PM PDT, ID: 21558294

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628