View Single Post
Old 07-29-2020, 01:58 PM   #25
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,264
Karma: 61916422
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 droopy View Post
Hi Ducks,
your code works for
C. S. Lew --> CS Lew

But for Charles Q. Smith
it becomes
Ch arles Q. Smith
(space between h and a. And dot after Q. isn't removed).


Bob T. Johnson --> Bo b T. Johnson
Bob A. B. Johnson --> Bo b A. B. Johnson
I gave you code for C. S. Lewis ( type case), just what you asked for (I did not even try to develop a general REGEX.

Again:
Why not use the Quality Check Plugin: to detect and FIX (that is where you also set the initials pattern desired)?

I run the detect (Check Authors initials), then run Fix on the reviewed-selected results (there are some cases to NOT fix)
theducks is offline   Reply With Quote