View Single Post
Old 12-30-2014, 05:07 PM   #15
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
I'm wondering if I have an issue with the actual TitleCasing RegEx-Function?

For this fragment ...


Code:
<body>

  <h1>TEST1 TEST1 TEST1 TEST1 TEST1 </h1>

  <p>NOW IS THE TIME and this should remain mixed case</p>

  <h1>TEST2 TEST2 TEST2 <br/><br/>TEST3 TEST3 </h1>

  <p>NOW IS THE TIME and this should remain mixed case</p>

  <h1>TEST4 <i>TEST4 TEST4 TEST4</i> TEST4 </h1>

</body>

... my Find expression

Code:
\<([Hh][1-6])\>.*?\</\1\>
... will find step through and highlight just the three H1 open/close pairs and what is between them (#2 in picture), but a Replace doesn't do anything except make the <h into a <H (#1 in picture)

It would seem to me that if the built in Title Case would ignore tags and what's in them, and just act on the 'Find' it should / would work for any embedded tags inside Hx pairs not just <br/>

Am I misunderstanding?
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	620
Size:	86.5 KB
ID:	133150  

Last edited by phossler; 12-30-2014 at 05:10 PM. Reason: Can't type
phossler is offline   Reply With Quote