开发者

java regex not working

开发者 https://www.devze.com 2023-04-09 18:23 出处:网络
Why this regex isnt working for non-word and non-digits like this开发者_运维问答: )(ª º ? sentence.split(\"[^(\\\\p{L}\\\\p{N})]\");

Why this regex isnt working for non-word and non-digits like this开发者_运维问答: )(ª º ?

sentence.split("[^(\\p{L}\\p{N})]");

Is it suposed to work or not?

PS: I can't find any information either on SOF or in the web


A better description of the problem would be nice, but I'm guessing you're looking for:

sentence.split("\\W+");
0

精彩评论

暂无评论...
验证码 换一张
取 消