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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Replace unuseless characters in a String" Watch "Replace unuseless characters in a String" New topic

Replace unuseless characters in a String

Mirco H Schmidt

Joined: Aug 25, 2010
Posts: 7

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: 10167

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

Joined: Oct 27, 2005
Posts: 19651

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

How To Ask Questions How To Answer Questions
Consider Paul's rocket mass heater.
subject: Replace unuseless characters in a String
Similar Threads
Please Help! Having problems with class program
sql file problem
Where do the CLDC class files need to be placed?
Unable to run a java program
how to insert data into existing file