• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic