How about looping through the var def as a collection & storing each
occurence of the words your looking for into an array. Then you can find out
how many times it occured using the ArrayLen() function.
HTH,
Mike
>From: Eric Fickes <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: count a value from string
>Date: Sun, 03 Dec 2000 17:50:05 -0500
>
>Hello all,
>
>I'm trying to count the number of occurences of a particular word in a
>block
>of text and I can't seem to figure out how to do this. Here's my code.
>
> <!--- Read the def file into variable def --->
> <cffile action="read" file="#logFile#" variable="def">
> begin schema : #ListValueCount(def, "begin schema", Chr(10))#
>
>I've got a cf page that reads a def file into a variable then parses it out
>into a more readable format. Previously I had no problems treating the
>variable #def# as a list using #Chr(13)# as my list delimiters, but now I
>can't seem to treat it as a list in this function. Any ideas?
>
>E
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists