aspose 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 Spring in Action this week in the Spring 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: 10451
    
    8

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: 19718
    
  20

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