J
Jerric
Hi, I need to remove special characters, except \w and single quotes,
from a string, can someone please help me on the regex?
for example, I have "ab'de+fg", I want to get "ab'defg", and I tried
the following code, but it removed single quote. seems to me java
cannot handle the pattern like [^'].
String val = "ab'de+fg";
val = val.replaceAll("[^\\w']+", "");
Thanks a lot,
from a string, can someone please help me on the regex?
for example, I have "ab'de+fg", I want to get "ab'defg", and I tried
the following code, but it removed single quote. seems to me java
cannot handle the pattern like [^'].
String val = "ab'de+fg";
val = val.replaceAll("[^\\w']+", "");
Thanks a lot,