Get the first 100 words of a paragraph.

Posted on 2005-04-11
Last Modified: 2010-07-27
How can I get the first 100 words of a paragraph.
Do I use an array with the split function or......

Please write out code:

Question by:quest_capital
    LVL 58

    Expert Comment

    tempArray=split("the_phrase"," ")

    for count=0 to 99
        response.write tempArray(count) & " "
    LVL 9

    Accepted Solution

    In case the paragraph doesn't always top 100 words:

    parVar = "Some long-winded paragraph."
    tempArray = Split(parVar," ")
    If UBound(tempArray)>=100 Then
          For Count = 0 To 99
              Response.Write tempArray(count) & " "
          Response.Write parVar
    End If

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now