Web Hosting Talk







View Full Version : asp question: counting number of repeated words in a text


rdnpa
09-04-2004, 04:18 AM
By using ASP im trying to count the number of repeated words in a text. Could not figure out how to do it. Any ideas?

For example:
I like apples, oranges, tables, apples, pizza, phones, apples, pizza, socks and apples.

In this sentence:
apples was used 4 times
pizza was used 2 times
oranges was used 1 time
phones was used 1 time
....

any ideas?

Burhan
09-04-2004, 04:53 AM
Here is an idea. Split the text into an array, count the number of duplicates in the array.