Results 1 to 4 of 4
- 04-18-2008, 07:59 AM #1
Member
- Join Date
- Apr 2008
- Posts
- 9
- Rep Power
- 0
Read-File Write Display substring
Hi ,
I would appreciate if somebody could help me with this.
I have a txt file with more than 4000 lines. I need to find a substring of 35 zeros '00000000000000000000000000000000000' and they could be in more than one place. This program should actually read from file to find those substring . If it find 35 zeros i need 10 digits in front of it for example if there was 15151515150000000000000000000000000000000000 i need 1515151515.This program should write those ten digits in a separate file in new line.
example output
1515151515
1616161616
1717171717
I am new to java . just learning i would appreciate anykind of help i could get.
- 04-18-2008, 08:05 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Hi hiklior,
Welcome to our community! :)
How about the arrangement of a single line. I mean is there fix number of digits?
What you have try up to now?
- 04-18-2008, 11:22 AM #3
Have an experiment on Matcher class and Pattern class...
It is useful...
regards,
sukatoa
- 04-18-2008, 11:45 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Similar Threads
-
how to write onto a file
By mirage_87 in forum New To JavaReplies: 6Last Post: 09-08-2009, 03:54 PM -
DES algorithm (Read and Write bytes to file)
By JoaoPe in forum Advanced JavaReplies: 6Last Post: 07-29-2008, 03:46 PM -
How to read a text file from a Java Archive File
By Java Tip in forum Java TipReplies: 0Last Post: 02-08-2008, 09:13 AM -
.jnlp cant read & write on browser despite signed .jar
By bongia in forum New To JavaReplies: 0Last Post: 11-14-2007, 06:04 PM -
Simplest way to read and display a jpeg image
By Hasan in forum New To JavaReplies: 1Last Post: 05-31-2007, 03:42 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks