dimanche 31 juillet 2016

Java Regex match and replace

I have set of some characters as below :

[A-Za-z0-9/-?:().,’+#=! ” %& * <>; {@rn] 

I have to write a program in java to make sure input is not having any character out of this set and if they do, I have to replace them with spaces.

How can I achieve this ? Only Java 6 please.

Aucun commentaire:

Enregistrer un commentaire