File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Replace unuseless characters in a String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Replace unuseless characters in a String" Watch "Replace unuseless characters in a String" New topic
Author

Replace unuseless characters in a String

Mirco H Schmidt
Greenhorn

Joined: Aug 25, 2010
Posts: 7

Hi,
I have a String, where I want to replace all the text starting from "{\\rtf1\\ansi" until "\\fs24",
both marked in BOLD.
Can anybody help, how I can replace this with regular expressions ?
Thanks Mirco
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

mirco schmidtfo wrote:


Please check your private messages for an important administrative matter.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

That looks like RTF, which means that these characters are most definitely not useless. Check out AccessingFileFormats for tips on reading RTF files.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Replace unuseless characters in a String
 
Similar Threads
Unable to run a java program
how to insert data into existing file
sql file problem
Where do the CLDC class files need to be placed?
Please Help! Having problems with class program