Only problem is if they are talking about AA or AAA ... multiple delimiters in a row don't count as additional list items.
Try this - get rid of all the occurrences and see how much the length changes: <cfset x = "this is a great place to talk about aa"> <cfset y = replace(x, "a", "", "ALL")> <cfset z = len(x) - len(y)> Dan -----Original Message----- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 12:50 PM To: CF-Talk Subject: RE: Number of times a character is in a string If it's one character, you should be able to treat it like a list delimiter. The only issue is if the char comes first. So, simply add a " " in front (assuming you aren't counting " " characters). <cfset x = "araymond camdena"> <cfoutput>#listlen(" " & x,"a")#</cfoutput> ======================================================================= Raymond Camden, ColdFusion Jedi Master for Macromedia Email : [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Graham Pearson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 30, 2002 3:44 PM > To: CF-Talk > Subject: Number of times a character is in a string > > > Anyway to find out the total number of times a character is > apart of a > specific string. Any direction greatly appreciated. > > > > -------------------------------------------------------------- > ----------------------------- > Graham Pearson, System Administrator / Certified Webmaster > Northern Indiana Educational Services Center > Http://support.niesc.k12.in.us Email: > [EMAIL PROTECTED] > > Voice (574) 254-0444 Ext 108 / (800) 326-5642 Fax: (574) 254-0148 > -------------------------------------------------------------- > ------------------------------ > > ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

