Results 1 to 3 of 3
Thread: parsing a text
- 09-29-2011, 01:48 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 25
- Rep Power
- 0
parsing a text
Hi,
I have a string in this format
I need to parse it in such a way that I can extract all the integers in it seperately into an array.Java Code:String a="1-12-3-10";
Eg:
I tried using it using 'substring'.but couldn't find a right solution. Any sort of help is appreciated. Thanks in advanceJava Code:b[1]=1; b[2]=12; b[3]=3; b[4]=10;
Regards
-
Re: parsing a text
Look at the String#split(...) method.
- 09-29-2011, 01:56 PM #3
Member
- Join Date
- Oct 2010
- Posts
- 25
- Rep Power
- 0
Similar Threads
-
String -> variable (setting variables from parsing a text file)
By marklee42 in forum New To JavaReplies: 1Last Post: 06-29-2011, 05:46 PM -
Problem in parsing text
By holy.water in forum New To JavaReplies: 11Last Post: 02-19-2011, 05:19 PM -
Applet program to open a text file and display the content in text area
By bitse in forum Java AppletsReplies: 0Last Post: 12-09-2010, 05:56 PM -
Parsing Text Files
By coder09 in forum New To JavaReplies: 6Last Post: 02-18-2009, 12:08 PM -
parsing/storing large text data
By hkansal in forum New To JavaReplies: 4Last Post: 10-19-2008, 06:34 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks