I would say gratifyingly simple. Very elegant, too.
But only on MX, cries the boy trapped in 5.
-- Ben Doom
Programmer & General Lackey
Moonbow Software, Inc
: -----Original Message-----
: From: Matthew Walker [mailto:[EMAIL PROTECTED]
: Sent: Thursday, June 19, 2003 9:41 PM
: To: CF-Talk
: Subject: Initial caps regex
:
:
: Hey I've just been playing with CFMX regular expressions and thought I'd
: share. You can write this to force initial caps:
:
: <cfset initialCapsText = rereplace(text, "(\b\w)", "\u\1", "all")>
:
: \b marks a transition to or from a word, \w marks an
: alphanumeric, \u means
: capitalize the next char, and \1 is a back reference. Alarmingly
: simple, eh?
:
:
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.cfhosting.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4