| | |
Removing paragraph
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Removing is the easy part you have to think about how you gone search/locate this unwanted part of text. What sort of criteria you will use? How you will handle your text, where you will get it from (user/file)?
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
•
•
Join Date: Jul 2007
Posts: 36
Reputation:
Solved Threads: 0
Am taking Text files from the folder it may have sum 30 files.Consider the papers like ieee if am having acknowledgement in between abstract and sum other topic i want to remove the acknowledgement In my previous thread i removed a line but considering paragraph, I dont know where to stop ..Here we cant expect all text files topic in this order in tat case how it comes.For example
Abstract
Test managers often need to make an initial estimate of the number of people
Acknowledgement
Some of the material in this paper was developed by the participants
Introduction
Past tester to developer ratios are often useful for making rough estimates of required test
Abstract
Test managers often need to make an initial estimate of the number of people
Acknowledgement
Some of the material in this paper was developed by the participants
Introduction
Past tester to developer ratios are often useful for making rough estimates of required test
Last edited by abar_sow; Sep 16th, 2007 at 2:12 am.
You'll have to read from one file and write what you want into another. As you scan your input, when you find line.startsWith("Acknowledgement") then keep reading lines but don't write any data until you get to the line.startsWith("Introduction").
I hope you aren't stripping copyrighted material of all copyright and acknowledegment info and presenting it for download though...
I hope you aren't stripping copyrighted material of all copyright and acknowledegment info and presenting it for download though...
•
•
Join Date: Jul 2007
Posts: 36
Reputation:
Solved Threads: 0
Locate the error plssssss
error:
D:\program files\Java\jdk1.5.0\bin>javac FileWriteDemo.java
FileWriteDemo.java:19: illegal start of expression
while(sr=br.readLine())!= null)
^
1 error
Java Syntax (Toggle Plain Text)
import java.io.*; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.FilenameFilter; import java.io.File; import java.lang.*; class FileWriteDemo { public static void main(String args[])throws IOException { FileReader fr = new FileReader("file3.txt"); BufferedReader br = new BufferedReader(fr); String s; StringBuffer sr =new StringBuffer(br); while(sr=br.readLine())!= null) { if(sr=="hi") { sr.delete(0,100); } } FileWriter f1= new FileWriter("file4.txt"); String str1=sr.toString(); f1.write(str1); f1.close(); } }
error:
D:\program files\Java\jdk1.5.0\bin>javac FileWriteDemo.java
FileWriteDemo.java:19: illegal start of expression
while(sr=br.readLine())!= null)
^
1 error
![]() |
Similar Threads
- Removing an item from head of linked list (C)
- Help Removing Norton (Windows Software)
- HJT Log, Need assistance removing "Blue Bar" (Viruses, Spyware and other Nasties)
- Need help removing hotoffers.info ... (Viruses, Spyware and other Nasties)
- Removing Dual Boot (Windows NT / 2000 / XP)
- removing admin. password on system 10.3 (OS X)
- Removing W2k SP4 from Dual boot with XP SP2 (Windows NT / 2000 / XP)
- removing 123mania.com.help here's my hijackthis log (Viruses, Spyware and other Nasties)
- Completely Removing Spyware (Viruses, Spyware and other Nasties)
- Removing Bridge.dll (Web Browsers)
Other Threads in the Java Forum
- Previous Thread: debugging JNI application
- Next Thread: Arrays and ArrayList
| Thread Tools | Search this Thread |
Tag cloud for Java
actionlistener android api apple applet application apps arguments array arrays automation balls binary bluetooth card chat class classes client code component consumer database draw eclipse ee error event exception fractal free game gameprogramming gis givemetehcodez graphics gui helpwithhomework html ide image input integer j2me j2seprojects java javaprojects jmf jni jpanel julia jvm key linux list loop machine map method methods migrate mobile mobiledevelopmentcreatejar myaggfun netbeans newbie nextline nls number oracle output print problem program programming project recursion recursive scanner screen security server set size sms socket sort spamblocker sql sqlite string sun swing terminal test threads time tree trolltech windows






