java- how to replace ? with another string

  YinHoNg 03:31 05 Nov 04
Locked

Here is bit of my code:

String newText;
newText =text.replaceAll(",","");//replaces all commas with the empty string
newText =text.replaceAll(".","");//replaces all periods with the empty string
newText =text.replaceAll("?","");//replaces all the question marks with the empty string
newText =text.replaceAll("'","");//replaces all quotation marks with the empty string
newText =text.replaceAll("!","");//replaces all the exclamation marks with the empty string

They all work except the ? and the '. how do i get rid of them?

  Pesala 11:07 05 Nov 04

I have a Javascript that replaces aa with ā for example. It uses character entities in the replace string. For ? it would be & #64 (remove the space or you will get @), for apostrophe it would be & #39

I don't know Javascript programming, but I guess this might work as the script that I have works fine.

  Pesala 11:09 05 Nov 04

Sorry, that should be & #63 for ?

This thread is now locked and can not be replied to.

How to get Windows 10 for free | How to install Windows 10: There is still a way to avoid paying…

1995-2015: How technology has changed the world in 20 years

Alex Chinneck’s giant ice cube Christmas tree at Kings Cross

Apple rumours & predictions 2017: The iPhone 8, new iPads, and everything else you should expect fr7…