一個字符串的特定部分我有一個包含這樣的事情可以在javascript
"Hello bla bla bla bla ok, once more bla können. // this is static: it doesn't change
This is a text, this also a text. // this is dynamically added text it can change each time
My name mysurename // this is also static text
www.blabla.com
"
現在我有內容,我必須得到字符串和第三部分的第一部分的字符串, 我想能夠有3個部分,我想我必須使用split()之類的東西來分割它。
string1 = "Hello bla bla bla bla ok, once more bla können.;
string2 = ""; // i have this part
string3 ="My name mysurename";
如果有幫助的第一部分與"können. "
結束,以上// its a fictional URL
Umm兩個代碼段中顯示的字符串不匹配。你也不會說這個文本來自哪裏。它是否在一個變量?或者是什麼。那些線條只是爲了插圖或文本總是格式化,像第一個textpiece和第二個textart之間的一個換行符,以及第二個和第三個文本片斷之間的兩個換行符 – jitter 2010-03-18 14:08:14
我已經閱讀了三次,我仍然無法弄清楚它是什麼。 – Pointy 2010-03-18 14:11:12
內容包含在一個聰明的模板中, – streetparade 2010-03-18 14:14:23