<cfif Left(variable1,4) IS Left(variable2,4)>
Code with what to do if they match
<cfelse>
Code with what to do if they don't match
</cfif>
You also have Right() and Mid(), just type in #Left()# and press <F1> and
you'll get help from CF :)
Sincirely
Tom Espen Pedersen
developer @ pixelduck.com
[EMAIL PROTECTED]
----- Original Message -----
From: "Michael Gribbin" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 8:13 AM
Subject: Read part of a string
> Hi, I need to compare the first 4 characters of a product code "BA01/ABC"
> with the first 4 characters of the next product code in sequence
"BA01/DEF"
> to see if they belong to the same group. How do I "read" only those first
4
> characters of each product code?
>
> Thanks in advance,
>
> Michael Gribbin
> Digital Marketing Alliance
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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