【发布时间】:2016-08-07 10:23:39
【问题描述】:
我有一个字符串(100*##G. Mobile Dashboard||Android App ( Practo.com )||# of new installs@@-##G. Mobile Dashboard||Android App ( Practo.com )||# of uninstalls@@
我想以返回以下结果的方式拆分字符串(即它匹配以## 开头并以@@ 结尾的所有字符,并用匹配的字符拆分字符串)
["(100*", "G. Mobile Dashboard||Android App ( Practo.com )||# of new installs", '-', 'G. Mobile Dashboard||Android App ( Practo.com )||# of uninstalls'
【问题讨论】:
-
初始字符串在这两个字符之间会有连字符。所以当用这个指定的字符分割字符串时,它需要在输出中给出连字符
-
听起来很像您只想拆分
##或@@。
标签: javascript regex string