my dog learned polymorphism*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Regular Expression
 
Similar Threads
validation in text field of accepting only partucular special characters
regex
Delete Special Charecters form the String
Regular expression - help
escape character nightmare - please help