Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-18-2008, 09:59 AM
Member
 
Join Date: Apr 2008
Posts: 9
hiklior is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-18-2008, 10:05 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,376
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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?
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 01:22 PM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 527
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
Have an experiment on Matcher class and Pattern class...

It is useful...

regards,
sukatoa
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-18-2008, 01:45 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,376
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Quote:
Originally Posted by sukatoa View Post
Have an experiment on Matcher class and Pattern class...

It is useful...

regards,
sukatoa
Yep, but sukatoa, if he doesn't know how to read a line from a file and write the result to a file Isn't it, going to be too difficult.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to write onto a file mirage_87 New To Java 4 10-22-2008 11:19 AM
DES algorithm (Read and Write bytes to file) JoaoPe Advanced Java 6 07-29-2008 05:46 PM
How to read a text file from a Java Archive File Java Tip Java Tips 0 02-08-2008 11:13 AM
.jnlp cant read & write on browser despite signed .jar bongia New To Java 0 11-14-2007 08:04 PM
Simplest way to read and display a jpeg image Hasan New To Java 1 05-31-2007 05:42 PM


All times are GMT +3. The time now is 01:05 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org