On Tue, Apr 7, 2009 at 7:53 AM, Pranathi Reddy <rk.prana...@gmail.com> wrote: > > 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>
You're doing a replace() on string1. Not a rereplace(). -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:321403 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4