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.
我有一个字符串blah-*-bleh-*-bloh ,我想将它拆分,-*-所以我尝试了(除其他外):
blah-*-bleh-*-bloh
-*-
res.split("/-\\*-/g");
但它不起作用。有人有想法吗?
在java中,不需要/之前和/g之后:
/
/g
String[] splittedArray = res.split("-\\*-");