House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Initial caps regex

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

Initial caps regex

Only about 5 months -- ironically, our test box is CFMX, because we've been Ben Doom 06/21/2003 01:52 PM
At least you haven't been struggling with CFCs and cryptic error messages Matthew Walker 06/20/2003 08:20 PM
I would say gratifyingly simple.  Very elegant, too. Ben Doom 06/20/2003 09:50 AM
Hey I've just been playing with CFMX regular expressions and thought I'd Matthew Walker 06/19/2003 09:43 PM

06/21/2003 01:52 PM
Author: Ben Doom Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24958#125726 Only about 5 months -- ironically, our test box is CFMX, because we've been trying to migrate.  However, the original migration date was cancelled because my boss's dad had a heart attack, and when we finally tried to migrate it (me being in KY, my bosses and the box in FL) it was unsuccessful and we had to roll back to CF5. :-( I'd love to be struggling with CFC's -- I was trained on C/C++ and miss objects.  I write UDFs for just about everything, and the error messages I've run into, while occasionally cryptic, were often more helpful than the 5 ones. --  Ben Doom     Programmer & General Lackey     Moonbow Software, Inc : -----Original Message----- : : Sent: Friday, June 20, 2003 8:18 PM : To: CF-Talk : Subject: Re: Initial caps regex : : : At least you haven't been struggling with CFCs and cryptic error messages : for a year! ;-) : : ----- Original Message ----- : From: "Ben Doom" <bdoom-hof@moonbow.com> : To: "CF-Talk" <cf-talk@houseoffusion.com> : Sent: Saturday, June 21, 2003 1:48 AM : Subject: RE: Initial caps regex : : : > 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----- : > : : > : 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? : > : : > : : > : : > :
06/20/2003 08:20 PM
Author: Matthew Walker Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24958#125698 At least you haven't been struggling with CFCs and cryptic error messages for a year! ;-) ----- Excess quoted text cut - see Original Post for more -----
06/20/2003 09:50 AM
Author: Ben Doom Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24958#125529 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----- : : 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? : : :
06/19/2003 09:43 PM
Author: Matthew Walker Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24958#125505 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?
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference