Thread: Regex examples
View Single Post
Old 09-25-2012, 05:30 PM   #146
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16078357
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Finding strings only contained in <p>....</p>

Some ebooks capitalize for emphasis and some capitalize all proper names.

The following experssion easily finds all cap words in a file: (\w{Lu}+\w).
The problem is that it finds all caps to inclued those in headers and other places where caps are wanted.

I have been trying for some time to build a regex that will limit itself the those cap words between <p> tags with no success.

Is there a way to do this?
crutledge is offline   Reply With Quote