Thread: RegEx
View Single Post
Old 12-12-2011, 02:31 PM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,133
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by el.motar View Post
This is embarrassing, must cut down on the wine before posting.

The reason I was having problems with particular RE F and R is that there are two headers plus other paragraphs with the same tags, i.e. the one posted and this type.
<p class="western3">Text text text text ....</p>

I wanted to mark the headings CARTA as h2 tags and the others as h3 tags.

The CARTA tags are easy, but once they are done, the only differentiation between these and the other paragraphs using the same tags is that these are all capital letters plus a space between the words.

I was trying to select paragraphs which contain only capital letters, the RE expression posted does the selection but I could not work out the replacement string.

Thanks for your time.

ATB
el.motar
\0 is the magic back reference for the whole found string
theducks is offline   Reply With Quote