zhanghong920
Programmer
Hello,
I need to use:
Pattern p = Pattern.compile("\\W");
Matcher m = p.matcher(str);
in order to add a space in front of each non-word character (btw, is this a good way to do that?). But "str" includes non English characters and I don't want them to be treated as non-word characters. How could I do that?
Many thanks!
I need to use:
Pattern p = Pattern.compile("\\W");
Matcher m = p.matcher(str);
in order to add a space in front of each non-word character (btw, is this a good way to do that?). But "str" includes non English characters and I don't want them to be treated as non-word characters. How could I do that?
Many thanks!