Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to solve: Dangling meta character '?' near index 0

807589Sep 1 2008 — edited Sep 1 2008
When I use String.replaceAll() function to replace "?" appearing in string by " " like this:
String s = "How are you?";
s.replaceAll("?", " ");

I got the error like this: Dangling meta character '?' near index 0 ?

Could anyone could help me to overcome this error?

Thanks,
Ringo
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 29 2008
Added on Sep 1 2008
3 comments
88,905 views