View Single Post
Old 03-09-2013, 09:39 PM   #1
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,076
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Is there RegEx to <span> ALL CAPS text?

RegEx question:

There's lot of text in all caps in something I'm trying to reformat. Doesn't really hurt, but I'd like to set it off somehow.

I've been trying to come up with a reg expression that would bracket the UC text with <span> tags, something like below, and then I could make a simple class to set the UC text off somehow ...

The Before:

Code:
<p>"AAAAAA BBBBBB CCCCCC, DDDDD EEEEE," he said, FFFFF GGGGG HHHHH. Zzzzzz yyyyy xxxxx.</p>

The (hopefully) After:

Code:
<p><span class="incaps">"AAAAAA BBBBBB CCCCCC, DDDDD EEEEE," </span> he said, <span class="incaps">FFFFF GGGGG HHHHH.</span> Zzzzzz yyyyy xxxxx.</p>
Or at least that's what I think I want, but I'm open to suggestions.

Couple of things that I noticed:

1. in EEEEE," he said, FFFFF ... the he said, is 'normal'

2. In HHHHH. Zzzzzzz ..... the cap Z is 'normal'

Thanks for any help

Paul
phossler is offline   Reply With Quote