• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Regular Expression

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic