Java file searching problem

Posted by Infinity on Stack Overflow See other posts from Stack Overflow or by Infinity
Published on 2010-03-20T17:52:59Z Indexed on 2010/03/20 18:01 UTC
Read the original article Hit count: 243

Filed under:
|

Hello guys!

I need to search a file for a word and return the whole line and the line number with this word, then edit the line and write back to the file. Maybe the line number isn't necesary to edit a line in a file. I `was reading after seraching with regexp and opening the filechannel of the file, but I can't get the line number. Maybe there are other better ways to do this. Can you help me how to start this?

© Stack Overflow or respective owner

Related posts about java

Related posts about file-io