regex - Java - Remove all non word characters of a string for all languages -
I need to remove all punctuation marks in words in Java.
System Out .println ("do., This". ReplaceAll ("[^ \ \ w]", "")); System.out.println ("scan") .replaceAll ("[^ \ \ w]", "")); But it will not work with kyrillic or other languages. I have already tried to work with
\ p {punct} , but the list is not complete, for example
"and» is unavailable
< P> It is not certain that
where \ p {wd} stands for any non-word character in any language. P {wd}
Comments
Post a Comment