SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Text to array
-
Apr 13, 2007, 11:06 #1
- Join Date
- Mar 2007
- Posts
- 19
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Text to array
How would I go about separating each line of a textbox into an array? Here's of example of the kind of text I want to separate.
text, <b>text</b>, <i>text</i>, text, <br>
text, <b>text</b>, <i>text</i>, text, <br>
text, <b>text</b>, <i>text</i>, text, <br>
-
Apr 13, 2007, 12:35 #2
- Join Date
- Apr 2007
- Location
- UK, soon in USA
- Posts
- 27
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Matt "Moridin8" Warren
======================================
Website: www.csharp-architect.com
....IRC: Usually freenode... '##csharp'
-
Apr 13, 2007, 13:44 #3
- Join Date
- Apr 2006
- Posts
- 802
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If you are talking about a string of text, split it on newlines-
var linearray=stringvalue.split(/\n/);
Bookmarks