View Single Post
Old 04-25-2013, 05:54 PM   #13
dwlamb
Member
dwlamb began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Apr 2013
Device: Android Smartphone
how do I capitalise more than two words in a string

I have a very long list of words that are all in capitals and it is necessary to change them to title case. For instance:
Code:
<li>DOG HOUSE</li>
needs to be
Code:
<li class="small-caps">Dog House</li>
The search string
Code:
<li>([A-Z])([A-Z]*)</li>
will find
Code:
<li>DOG</li>
<li>CAT</li>
<li>BIRD</li>
and replace them as I want using this replace syntax
Code:
<li class="small-caps">\1\L\2</li>
The list items I am searching on in come cases are as many as 5 words. Is there a method of RegEx to accomplish this or am I asking too much of this tool?
dwlamb is offline   Reply With Quote