This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Regular Expression Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Regular Expression" Watch "Regular Expression" New topic
Author

Regular Expression

ajay yaduwanshi
Greenhorn

Joined: Oct 12, 2007
Posts: 28
Hi All,

I am having a very small issue I want a regular expression which can replace and string ’' — ' these are basically quotes double and single quotes in xml file there are many other similar characters string in the file, I want to know a generic expression that can replace all this.

I am eagerly waiting for the response from your side.

I am trying to use this expression for it
summary =summary.replaceAll("&(#?)(x?)([0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);","")
but unable to do it.

Thanks & Regards

Ajay
[ January 10, 2008: Message edited by: ajay yaduwanshi ]
Balasubramanian Chandrasekaran
Ranch Hand

Joined: Nov 28, 2007
Posts: 215

What exactly you need to replace,Alphabets or Alphanumerics or Punctuations.
Have you gone through repalceAll(String,String);
and also
Regular Expressions
ajay yaduwanshi
Greenhorn

Joined: Oct 12, 2007
Posts: 28
Hi
Thanks for your reply, however I have already through the suggestive link, sorry it was my that I have not put the exact expression which I want to replace here are the expressions which I want to replace.
"//’//"" "//”//" "//—//"

Hope you got my point

Thanks
Ajay
[ January 10, 2008: Message edited by: ajay yaduwanshi ]
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Regular Expression
 
It's not a secret anymore!