?
Solved

Get the first 100 words of a paragraph.

Posted on 2005-04-11
2
Medium Priority
?
250 Views
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:

Thanks
0
Comment
Question by:quest_capital
2 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 13754056
<%
tempArray=split("the_phrase"," ")

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

Accepted Solution

by:
cb1393 earned 1000 total points
ID: 13754331
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) & " "
      Next
Else
      Response.Write parVar
End If
%>
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

850 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