Hi, Jacob... Actually, it seems the opposite approach has resulted in the error trapping I was looking for.
One of the things I wanted to do was allow garbage entries to be caught and an error message and the garbage input to be redisplayed in the form. By taking out only the good stuff, in this case, a comma, a period, and a dollar sign, I'm able to still trap everything else that is non-numeric and still be able to process data that is legitmately entered (from the user's perspective) and does use a comma, period, or dollar sign. Other thoughts on this? Thanks for your input...oh, btw, I sent an email in earlier to the list that describes my (hopefully) final solution. Rick > -----Original Message----- > From: Munson, Jacob [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 08, 2006 9:52 AM > To: CF-Talk > Subject: RE: How do I write a Regex for this? > > > BTW, it looks like you might be removing extra notations from a number. > If that's the case, you might have problems if people enter other bogus > data (like letters, other special characters). It's always better to > only allow the data you want, instead of removing possible bad data > (like what virus scanners do, and why you /always/ have to update your > definitions). So the below regex would remove anything that's not a > numeric digit: > > <cfset myStr2 = ReREplace(myStr,"[^[:digit:]]+","","all")> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234610 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

