View Single Post
Old 12-13-2018, 02:19 PM   #8
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,827
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by jackie_w View Post
@RbnJrg,

This is stretching my limited regex lookahead knowledge The closest I could get (tested in calibre) was something like:
Code:
Find:\b([a-z])\s+(?=(\w\s+\w))
Replace:\1
with case-sensitivity disabled.

I think you'd need to replace them one-by-one not 'Replace All'.
Thank you very much for your response Jackie. It almost worked When I have, for example:

Code:
C H A P T E R  V I I I
after applying your code, I have:

Code:
CHAPTERVII I
Where my strings are all in uppercase, I can use your code with \b([A-Z])\s+(?=(\w\s+\w)) and case-sensivity enabled and I can do the work at once. So, if it were possible to solve the issue, your RegEx is very usefull.
RbnJrg is online now   Reply With Quote