Thanks Charlie and Peter for quick reponse... in either way I do ... I am getting -1 (string1 is less than string 2) Se below is that I did...
<cfset string1 = '0010as1000'> <cfset string2 = '10as1'> <cfoutput>#compareNoCase(replace(string1,'^0*|0*$','','all'),rereplace(string2,'^0*|0*$','','all'))#</cfoutput> or <cfset string1 = '0010as1000'> <cfset string2 = '10as1'> <cfoutput>#compareNoCase(replace(string1,'^0+|0$','','all'),rereplace(string2,'^0+|0$','','all'))#</cfoutput> Thanks, Pranathi > > So... what rules are you working with? Are you saying that any > > leading/trailing zeros should be ignored? > > > > If so, rereplace(string1, '^0*|0*$', '', 'all') should remove > > leading/trailing zeros. > > Hmmmm. Bit inefficient matching with * - that means you're always > matching the positions ^ and $ whether there are any leading/trailing > zeros or not. > > ^0+|0+$ would be better - only replacing when zeroes exist. > > > It's a small change, but if this comparison is only part of a larger > loop, it might have an impact. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321394 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

