Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Splitting Text into an Array (http://www.velocityreviews.com/forums/t800599-splitting-text-into-an-array.html)

nvanhaaster@caitele.com 02-07-2006 05:51 PM

Splitting Text into an Array
 
Quick question, I need to split a large amount of text into an array
everytime there is an enter (meaning line down) what is the code for
the delimiter i would use..

Example text

Hello
This is some sample
text that needs to be put
into an array
by everytime
we go to the next line

sample code

Array = Split(sampletext,?)


Bob Barrows [MVP] 02-07-2006 06:20 PM

Re: Splitting Text into an Array
 
nvanhaaster@caitele.com wrote:
> Quick question, I need to split a large amount of text into an array
> everytime there is an enter (meaning line down) what is the code for
> the delimiter i would use..
>

Probably vbCrLf, but it could be vbCr or vbLf. You'll need to try them to
see which works.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



Ray Costanzo [MVP] 02-07-2006 06:22 PM

Re: Splitting Text into an Array
 
Try using vbCrLf

theArray = Split(sampletext, vbCrLf)

It's the VB[S] constant for carriage return + line feed.

Ray at work


<nvanhaaster@caitele.com> wrote in message
news:1139334715.120915.223210@z14g2000cwz.googlegr oups.com...
> Quick question, I need to split a large amount of text into an array
> everytime there is an enter (meaning line down) what is the code for
> the delimiter i would use..
>
> Example text
>
> Hello
> This is some sample
> text that needs to be put
> into an array
> by everytime
> we go to the next line
>
> sample code
>
> Array = Split(sampletext,?)
>





All times are GMT. The time now is 09:00 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.