Sorry to take so long to get to something with my name on it, but I was out
of town yesterday.
If what you wanted was just the "27" this is probably the closest so far.
I personally would probably take a cue from Mr. Dinowitz and do something
like this:
num = rereplace(string, ".*\$([1-9][0-9]*).*", "\1");
That will strip any leading 0's off the price.
-- Ben Doom
Programmer & General Lackey
Moonbow Software, Inc
: -----Original Message-----
: From: Matthew Walker [mailto:[EMAIL PROTECTED]
: Sent: Thursday, August 28, 2003 5:32 PM
: To: CF-Talk
: Subject: RE: calling ben doom or other 4 simple regex
:
:
: How about Rereplace(mystring, "[^$]*\$([[:digit:]]+)\..*", "\1")
:
: > -----Original Message-----
: > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
: > Sent: Friday, 29 August 2003 9:11 a.m.
: > To: CF-Talk
: > Subject: calling ben doom or other 4 simple regex
: >
: > i have a form that the user can select from a menu
: > say they pick this one
: >
: > DVD : Shipping(europe) : insurance > total $27.00(us funds)
: >
: > i need to strip that down to be just the dollar amount in a whole # so
: > that # can be used on a paypal button.
: > in this case 27
: >
: >
: >
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.cfhosting.com