School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,362 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,483 people online right now. Registration is fast and FREE... Join Now!




Replace Special characters like ^ / ? : with empty string

 

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

sutr_kam

12 Jun, 2009 - 04:38 AM
Post #1

New D.I.C Head
*

Joined: 15 Feb, 2009
Posts: 21

Replace Special characters like ^ / ? : with empty string

Hai iam using str.replaceAll("/[^a-zA-Z 0-9]+/g","");
CODE

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

User is offlineProfile CardPM
+Quote Post


jjsaw5

RE: Replace Special Characters Like ^ / ? : With Empty String

12 Jun, 2009 - 04:50 AM
Post #2

I must break you
Group Icon

Joined: 4 Jan, 2008
Posts: 2,656



Thanked: 25 times
Dream Kudos: 125
My Contributions
Please do not double post your questions.
User is offlineProfile CardPM
+Quote Post

Closed TopicStart new topic

Time is now: 11/7/09 08:14PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month