If you don't care where in the string it is contained, but just a yes/no, what about
<cfif secondVar contains FirstVar> do something <cfelse> do something else </cfif> Jerry Johnson >>> [EMAIL PROTECTED] 02/20/03 11:45AM >>> Checkout the following CF functions ListContains ListContainsNoCase >From CFDocs Desc: Returns the index of the first item that contains a specified substring. The search is case-sensitive. If the substring is not found in the list items, it returns zero (0). Use: ListContains(list, substring [, delimiters ]) -----Original Message----- From: FlashGuy [mailto:[EMAIL PROTECTED]] Sent: 20 February 2003 16:37 To: CF-Talk Subject: Checking variables Hi, I have two variables. I need to check if the contents of the first variable exists in the second and if it does to something and if not do something else. How can I do this with a <cfif statement? Example: var1 = mywork var2= C:\temp,C:\windows,c:\program files,c:\tmp DO THIS Or it could be var1 = mywork var2= C:\temp,C:\windows,c:\mywork,c:\program files,c:\tmp DO SOMETHING ELSE. --------------------------------------------------- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --------------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

