Here's one I did a while ago: http://cflib.org/udf.cfm?id=889&enable=1
You get to determine what first letter should be uppercased based on a list of delimiters. There was two versions of this, one was more long winded because of a bug with ListSetAt(). I forget the details. Not RegEx I know, just a little self promotion :OD Adrian -----Original Message----- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: 21 October 2005 19:09 To: RegEx Subject: Re: Uppercasing first letters of certain words I think it is called CapFirst. But obviously, Ben is a RegEx master! -----Original Message----- From: Ben Doom <[EMAIL PROTECTED]> To: RegEx <[email protected]> Sent: Fri Oct 21 19:14:37 2005 Subject: Re: Uppercasing first letters of certain words You could do every other word (the first word in every pair) but if you're not careful, you'll end up capitalizing "and". It might be more accurate just to build a replace list like "one, two, three....eighty, ninety" and replace with the capitalized versions. --Ben Tony Hicks wrote: > I have a sentences like > > fifty-six thousand two hundred thirty-one dollars and 17/100 > > And I need to uppercase the first letter of each word or word pair, without > uppercasing the words like thousand, hundred, million > > So the above line would become > > Fifty-six thousand Two hundred Thirty-one dollars and 17/100 > > And I can't figure out how to go about it... Basically all numbers are > capitalized, except when immediately preceded by a hyphen. > > Any thoughts? > > Tony ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:21:939 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/21 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:21 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
