• 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

Parsing Strings in Java

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This question may be asked a lot but I can't find much useful info about my problem... What I want to do is parse a string and substitute say the "'" out of the string with say "`" how would I go about doing this??? I think VB it was something like
parseString(String, "'", "`");
I looked at the documentation for parse(java.lang.String, parameter list) I'm just not sure what the hell is a parameter list..!?!?!?!
If someone can show me how to simply parse a string in java that would be great!!! Hehehe!
Thanks in Advance!
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
if you want to escape the apostrophe for a sql insert this has some code that will do the job:
http://developer.java.sun.com/developer/qow/archive/139/index.jsp
hope it helps...
Peter
 
Tony Huynh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter,
Thanks mate!
You're a life saver!!!

-Tony
 
permaculture is largely about replacing oil with people. And one tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic