View Single Post
Old 07-15-2019, 07:57 PM   #4
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 nbveh View Post
thanks!

It works almost perfectly, except:

it detects this kind of lines: <p class="calibre1"> I</p>

It detects lines with one word only.

Can i somehow limit is to choose like where there's more than one word? And more than one character?

Again, thanks a lot, i'll try to understand how it all works!
The expression is looking for (in order):
(
a optional space (the * says 0 or more)
Upper case letters (The case sensitivity affects this)
)
Repeat the pattern 1,to many times
So make 2 changes
Code:
<p class=".+">(\s*[A-Z][A-Z]){2,}</p>
It requires at least 2 consecutive words (with optional leading space)
But this has the bad effect of missing ANY 1 letter word .
You might run this one first, the run the original on MANUALLY as the number of hits should be greatly reduced.

BTW I ASSUME, you are using the Editor, not trying to do this as part of a conversion
theducks is offline   Reply With Quote