Interesting.  Have you actually confirmed that it won't work?

The regex should only strip a single zero character from the beginning
of the string.  However, the ALL argument is specified.

I would agree with you that it should not strip more than one leading
zero, but does the ALL argument cause the function to recursively run
the regex until all leading zeros are removed?

Either way, the function should probably be updated to what you would
expect to see.

reFind(origString, "^0+", "")

m!ke

-----Original Message-----
From: James Smith [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 01, 2008 9:52 AM
To: CF-Talk
Subject: Re: Trim leading zeros

> CFLib.org has a UDF that does this:
>
>  http://cflib.org/udf.cfm?ID=239

That wouldn't work, looking at the code for that UDF it would only strip
the first zero...

--
Jay

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302435
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to