Results 1 to 2 of 2
Thread: String Splitting
- 12-04-2009, 06:26 AM #1
Member
- Join Date
- Dec 2008
- Posts
- 17
- Rep Power
- 0
String Splitting
Hi,
I have a text file and I read it by buffered reader ..
but when I split each line by split() method I face a problem
that it doesn't split the line as I want, here's an example :
*let the last line of the text above is read and stored in a string named "A".
String [] words = A.split("[,. ]");
then I wanted to determine location of each word in this string.. (e.g the word "that" is stored in cell [0] in the array)
but when I was working and trying it, it gave me the word "here's" in the cell [10] and I want it in cell [9]..
this's the problem, I looked everywhere but couldn't find solution :( !!
Thanks :)
- 12-04-2009, 07:17 AM #2
Similar Threads
-
Reading files and splitting them
By Dieter in forum Advanced JavaReplies: 5Last Post: 09-30-2009, 09:46 AM -
Array splitting
By Lunarion in forum New To JavaReplies: 3Last Post: 04-17-2009, 08:00 AM -
Splitting paragraph into line statements
By mintu in forum New To JavaReplies: 3Last Post: 02-28-2009, 08:41 AM -
Splitting single string into array elements
By phil128 in forum New To JavaReplies: 11Last Post: 01-12-2009, 11:51 AM -
splitting string and replacing
By itsme in forum New To JavaReplies: 1Last Post: 12-11-2007, 03:08 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks