我使用的是 string.split(regex),所以在每个 ',' 之后剪切我的字符串,但我不知道如何在 ',' 之后的空格之后剪切。
String content = new String("I, am, the, goddman, Batman");
content.split("(?<=,)");
给我数组
{"I,"," am,"," the,"," goddman,"," Batman"}
我真正想要的是
{"I, ","am, ","the, ","goddman, ","Batman "}
谁能帮帮我?
最佳答案
关于java - 在逗号后面的空格后找不到正确的正则表达式来拆分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10522731/