我会像下面得到两个符号之间的字符串中的字符串,并将其推到一个数组
var str = "-#A
This text belongs to A.
Dummy Text of A.
-#B
This text belongs to B.
Dummy Text of B.
-#C
This text belongs to C.
Dummy text of C.
-#Garbage
This string should be ignored"
我要像下面忽略文本为“垃圾”
var arr = [["A","This text belongs to A.
Dummy Text of A."],["B","This text belongs to B.
Dummy Text of B."] etc...]
标题数组的字符串
请帮我。我怎样才能做到这一点...
我假设你的引号应该在“这个字符串被忽略..”之后,而不是在“C的虚拟文本”之后。 – Jeff 2012-01-18 03:37:37
@Jeff是的,我正在编辑。谢谢 – Exception 2012-01-18 03:39:34
是只有一行或“\ n”新行有吗??? – 2012-01-18 03:44:43