Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用所有非字母数字字符作为分隔符拆分字符串,但 Java 的 String.split() 方法会丢弃结果数组中的分隔符。有没有办法像 "\W" 正则表达式模式那样拆分字符串,但保留分隔符?