Replace Special characters like ^ / ? : with empty string

Replace Special characters like ^ / ? : with empty string

Page 1 of 1

1 Replies - 2079 Views - Last Post: 12 June 2009 - 05:50 AM Rate Topic: -----

#1 sutr_kam  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 15-February 09

Replace Special characters like ^ / ? : with empty string

Posted 12 June 2009 - 05:38 AM

Replace Special characters like ^ / ? : with empty string

Hai iam using str.replaceAll("/[^a-zA-Z 0-9]+/g","");
 
String str = "Hai ? hello : abc ^ ";
str.replaceAll("/[^a-zA-Z 0-9]+/g","");



for replacing the special characters in a String str
the regular expression is working in javascript and it is not working here in java

Can anyone let me know how to replace the specail characters with empty in a String in Java

Advaced Thanks,
sutr kam

Is This A Good Question/Topic? 0
  • +

Replies To: Replace Special characters like ^ / ? : with empty string

#2 jjsaw5  Icon User is offline

  • I must break you
  • member icon

Reputation: 90
  • View blog
  • Posts: 3,060
  • Joined: 04-January 08

Re: Replace Special characters like ^ / ? : with empty string

Posted 12 June 2009 - 05:50 AM

Please do not double post your questions.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1