View Single Post
Old 02-05-2014, 10:50 AM   #7
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
@Doitsu --

Quote:
Find:<h1>CHAPTER ([[:upper:]])([[:upper:]]{2,})</h1>
Replace:<h1>Chapter \1\L\2\E</h1>

For more examples see this older post of mine.
Thanks, and I did look at the older post. Interesting

However, when I followed the suggestion, it didn't quite get what I was hoping to accomplish since there could be anything between the H1 (or other) tags and not literally "CHAPTER"

What I thinking I was looking for was a more general purpose F-R that would make any text between tags and Title Case it.

The <h1>CHAPTER ONE</h1> was really just a (poor) example. A general example might be

<tag>TEXT TEXT TEXT</tag>

becoming

<tag>Text Text Text</tag>

since some of the H#'s are for "PART 2" and "CHAPTER 3" and sometimes just "ONE", "TWO", ...

In the best of all possible worlds, I'd have 2 or 3 stored clips to title case H1, H2, and H3. When I had an oddball set of tags, I'd do that F&R manually, but I'd be smarter

Thanks
phossler is offline   Reply With Quote