Hi,
I am new to java (normally program in perl and bash).

I have an array that has X amount of rows that look like this:

2011-02-24,XXXDAO_456912 - (none) - (direct),(none),(direct),(not set),(not set),0,5447,1,3639.71,3521.86,0,0

What I need to do is take this column - XXXDAO_456912 - (none) - (direct) - and extract only the number - 456912. I can and have done this in perl/bash but so new to java I am not sure where to begin. Google has given me some info but not everything.

Any help would be greatly appreciated.
-JF

Am I correct in thinking the whole thing is an array of Strings, each row is a String?
If so, you can use Java's regex which is not too far from perl's. The major difference is that regexen are created as Strings, which means you have to worry about escaping characters correctly. You're probably familiar with regex from perl - google will find you good information on java regex, and that should sort you out.

Yes, the entire thing is an array of strings. thank you, I will search out java regex.

Thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.